Page MenuHomePhabricator

[mempool] always assert coin spent and do it only once in a row
ClosedPublic

Authored by PiRK on Nov 9 2022, 14:19.

Details

Summary

This is an extremely cheap function (just checks that the coin CTxOut isn't null) that doesn't need to be gated on check_ratio.

Run coin.IsSpent only once in a row

This is a partial backport of core#22677 and core#24102
https://github.com/bitcoin/bitcoin/pull/22677/commits/64e4963c635ec3a73a5fa3f32f6ec08e70609f60
https://github.com/bitcoin/bitcoin/pull/24102/commits/fa2bcc4e42e7fed61727b3de4019e9702d4090ce

Depends on D12443

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Nov 9 2022, 14:19
Fabien requested changes to this revision.Nov 9 2022, 14:31
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/txmempool.cpp
737 ↗(On Diff #36194)

This is either testing nothing, or you introduced a reachable assert

This revision now requires changes to proceed.Nov 9 2022, 14:31
PiRK retitled this revision from mempool] always assert coin spent to [mempool] always assert coin spent and do it only once in a row.
PiRK edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Nov 9 2022, 17:21