Merge pull request #2567 from nspcc-dev/check-consensus-start

consensus: check whether server is started before transaction handling
This commit is contained in:
Roman Khimov 2022-06-28 18:48:22 +03:00 committed by GitHub
commit a748298564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,7 +414,7 @@ func (s *service) OnPayload(cp *npayload.Extensible) error {
}
func (s *service) OnTransaction(tx *transaction.Transaction) {
if s.dbft != nil {
if s.dbft != nil && s.started.Load() {
s.transactions <- tx
}
}