Bucky/mempool txsmap (#3512)

* mempool: resCb -> globalCb

* reqResCb takes an externalCb

* failing test for #3509

* txsMap is sync.Map

* update changelog
This commit is contained in:
Ethan Buchman
2019-03-31 07:14:18 -04:00
committed by Ismail Khoffi
parent 2233dd45bd
commit 422d04c8ba
5 changed files with 141 additions and 60 deletions

View File

@ -19,7 +19,7 @@ func TestCacheRemove(t *testing.T) {
for i := 0; i < numTxs; i++ {
// probability of collision is 2**-256
txBytes := make([]byte, 32)
rand.Read(txBytes)
rand.Read(txBytes) // nolint: gosec
txs[i] = txBytes
cache.Push(txBytes)
// make sure its added to both the linked list and the map