diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 3bd9d62866d50..f6847946f93ca 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2676,6 +2676,11 @@ UniValue CreateUTXOSnapshot( unsigned int iter{0}; std::vector> coins; + // In the following code we collect all the coins (in the coins vector) + // that belong to a certain txid (key.hash) and when we have them all + // (key.hash != last_hash) we write them to file using the below lamda + // function. + // See also https://github.com/bitcoin/bitcoin/issues/25675 auto write_coins_to_file = [&](AutoFile& afile, const uint256& last_hash, const std::vector>& coins) { afile << last_hash; WriteCompactSize(afile, coins.size());