Closed moodyjon closed 2 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
rpcserver.go | 0 | 1 | 0.0% | ||
server.go | 0 | 5 | 0.0% | ||
mempool/memusage.go | 43 | 59 | 72.88% | ||
mempool/mempool.go | 35 | 64 | 54.69% | ||
<!-- | Total: | 78 | 129 | 60.47% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
peer/peer.go | 2 | 76.47% | ||
btcec/signature.go | 3 | 92.82% | ||
btcjson/walletsvrcmds.go | 14 | 95.92% | ||
claimtrie/claimtrie.go | 21 | 75.21% | ||
rpcclient/wallet.go | 362 | 0% | ||
rpcserver.go | 662 | 0.3% | ||
<!-- | Total: | 1064 | --> |
Totals | |
---|---|
Change from base Build 2653196456: | 0.08% |
Covered Lines: | 22543 |
Relevant Lines: | 43432 |
Looks good to me. And encouraged to upstream this to btcd as it's a general improvement.
Fixes https://github.com/lbryio/lbcd/issues/60
Field "loaded" only makes sense if the Mempool is being saved/loaded on restart. I don't see that happening. Field "maxmempool" would need more configuration infrastructure, and could be supported if that were added.
The "usage" (memory) and "unbroadcastcount" were my attempt to mimic what's done in C++ bitcoin (https://github.com/bitcoin/bitcoin).
Manual test, showing rollover back to near 0 size, apparently on new block acceptance.
Investigating automated tests next...