forked from TrueCloudLab/neoneo-go
consensus: check whether server is started before transaction handling
consensus.OnTransaction is a callback, so it can be called at any time. We need to check whether service (and dBFT) is started before the subsequent transaction handling like it is done inside the OnPayload callback.
This commit is contained in:
parent
2a24983727
commit
de203b5c76
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue