HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12446

Details

Provenance
glozow <gloriajzhao@gmail.com>Authored on Sep 29 2021, 19:55
PiRKCommitted on Nov 10 2022, 08:50
PiRKPushed on Nov 10 2022, 08:50
Reviewer
Restricted Project
Differential Revision
D12446: [mempool] always assert coin spent and do it only once in a row
Parents
rABC7ebe2bd9355d: [refactor] put finality and maturity checking into a lambda
Branches
Unknown
Tags
Unknown