core: only fire one chain head per batch (#15123)

* core: only fire one chain head per batch

* miner: announce chan events synchronously
This commit is contained in:
Péter Szilágyi
2017-09-11 13:13:05 +03:00
committed by GitHub
parent 5596b664c4
commit 10b3f97c9d
3 changed files with 63 additions and 67 deletions

View File

@ -935,7 +935,7 @@ func TestReorgSideEvent(t *testing.T) {
}
gen.AddTx(tx)
})
chainSideCh := make(chan ChainSideEvent)
chainSideCh := make(chan ChainSideEvent, 64)
blockchain.SubscribeChainSideEvent(chainSideCh)
if _, err := blockchain.InsertChain(replacementBlocks); err != nil {
t.Fatalf("failed to insert chain: %v", err)