aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/evm/vm.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index 92e51e6..c02b835 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -730,6 +730,7 @@ func (vm *VM) writeBackMetadata() {
// expected block hash
// Waits for signal to shutdown from txPoolStabilizedShutdownChan chan
func (vm *VM) awaitTxPoolStabilized() {
+ defer vm.shutdownWg.Done()
for {
select {
case e := <-vm.newTxPoolHeadChan.Chan():
@@ -744,13 +745,13 @@ func (vm *VM) awaitTxPoolStabilized() {
default:
}
case <-vm.txPoolStabilizedShutdownChan:
- vm.shutdownWg.Done()
return
}
}
}
func (vm *VM) awaitSubmittedTxs() {
+ defer vm.shutdownWg.Done()
vm.txSubmitChan = vm.chain.GetTxSubmitCh()
for {
select {
@@ -763,7 +764,6 @@ func (vm *VM) awaitSubmittedTxs() {
case <-time.After(5 * time.Second):
vm.tryBlockGen()
case <-vm.shutdownSubmitChan:
- vm.shutdownWg.Done()
return
}
}