btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.1k stars 2.31k forks source link

blockchain: fix a bug where a duplicate entry is possible in the mapslice #2134

Closed kcalvinalvin closed 3 months ago

kcalvinalvin commented 3 months ago

Adds a test and fixes the bug to fix a case where a duplicate entry in the mapslice is possible.

Not sure if this is related to the other cases we've been seeing since the outpoints should never have duplicates, fixing this is good since the code is assuming that the mapslice will not have duplicates.

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 8184106558

Details


Files with Coverage Reduction New Missed Lines %
mempool/mempool.go 1 66.84%
peer/peer.go 5 74.16%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 8160957537: 0.01%
Covered Lines: 29295
Relevant Lines: 51602

💛 - Coveralls