Patch for concurrent iterator & others (onto v1.11.6) #386

Closed
roysc wants to merge 1565 commits from v1.11.6-statediff-v5 into master
Showing only changes of commit 00a9b80b5c - Show all commits

View File

@ -36,19 +36,19 @@ type testTxRelay struct {
send, discard, mined chan int send, discard, mined chan int
} }
func (self *testTxRelay) Send(txs types.Transactions) { func (r *testTxRelay) Send(txs types.Transactions) {
self.send <- len(txs) r.send <- len(txs)
} }
func (self *testTxRelay) NewHead(head common.Hash, mined []common.Hash, rollback []common.Hash) { func (r *testTxRelay) NewHead(head common.Hash, mined []common.Hash, rollback []common.Hash) {
m := len(mined) m := len(mined)
if m != 0 { if m != 0 {
self.mined <- m r.mined <- m
} }
} }
func (self *testTxRelay) Discard(hashes []common.Hash) { func (r *testTxRelay) Discard(hashes []common.Hash) {
self.discard <- len(hashes) r.discard <- len(hashes)
} }
const poolTestTxs = 1000 const poolTestTxs = 1000