Merge bitcoin/bitcoin#25663: tracing: do not use coin after move in CCoinsViewCache::AddCoin

f8e228476f tracing: do not use `coin` after move in `CCoinsViewCache::AddCoin` (Seibart Nedor)

Pull request description:

  This is fix for https://github.com/bitcoin/bitcoin/issues/25640.

ACKs for top commit:
  0xB10C:
    ACK f8e228476f

Tree-SHA512: e7643ac8e6b6247aaf250f44572c4b458da4aea030ac0268227564e6857200e9c23efe325cfc535f46498cbeccaf46301551efeeb54b062f71d2dcf1ffe71fb8
This commit is contained in:
MacroFake
2022-08-01 11:04:58 +02:00

View File

@@ -99,9 +99,9 @@ void CCoinsViewCache::AddCoin(const COutPoint &outpoint, Coin&& coin, bool possi
TRACE5(utxocache, add,
outpoint.hash.data(),
(uint32_t)outpoint.n,
(uint32_t)coin.nHeight,
(int64_t)coin.out.nValue,
(bool)coin.IsCoinBase());
(uint32_t)it->second.coin.nHeight,
(int64_t)it->second.coin.out.nValue,
(bool)it->second.coin.IsCoinBase());
}
void CCoinsViewCache::EmplaceCoinInternalDANGER(COutPoint&& outpoint, Coin&& coin) {