From 8221e89ac40349bfb322f9ca573c7fd9237e46a2 Mon Sep 17 00:00:00 2001 From: TheCharlatan Date: Fri, 18 Apr 2025 13:59:56 +0200 Subject: [PATCH] validation: Move coin existence and spend check to SpendBlock Move the remaining UTXO-related operations from ConnectBlock to SpendBlock. This includes moving the existence check, the UpdateCoins call, and CBlockUndo generation. ConnectBlock now takes a pre-populated CBlockUndo as an argument and no longer accesses or manipulates the UTXO set. --- src/bench/connectblock.cpp | 6 +- src/consensus/tx_verify.cpp | 12 +--- src/consensus/tx_verify.h | 2 +- src/test/coinstatsindex_tests.cpp | 6 +- src/test/fuzz/coins_view.cpp | 2 +- src/txmempool.cpp | 3 +- src/validation.cpp | 102 ++++++++++++++++++++---------- src/validation.h | 6 +- 8 files changed, 86 insertions(+), 53 deletions(-) diff --git a/src/bench/connectblock.cpp b/src/bench/connectblock.cpp index e51333d0d27..1451b88c9d0 100644 --- a/src/bench/connectblock.cpp +++ b/src/bench/connectblock.cpp @@ -9,6 +9,7 @@ #include