Browse Source

Update reactor.go (#5088)

check bcR.fastSync flag when "OnStop"

fix "service/service.go:161	Not stopping BlockPool -- have not been started yet	{"impl": "BlockPool"}" error when kill process
pull/5095/head
Lei Wang 5 years ago
committed by GitHub
parent
commit
430162f8a1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      blockchain/v0/reactor.go

+ 3
- 1
blockchain/v0/reactor.go View File

@ -128,7 +128,9 @@ func (bcR *BlockchainReactor) SwitchToFastSync(state sm.State) error {
// OnStop implements service.Service.
func (bcR *BlockchainReactor) OnStop() {
bcR.pool.Stop()
if bcR.fastSync {
bcR.pool.Stop()
}
}
// GetChannels implements Reactor


Loading…
Cancel
Save