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

f8e228476f54b36beacc3fd09038dfeebdac6b3c 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 f8e228476f54b36beacc3fd09038dfeebdac6b3c

Tree-SHA512: e7643ac8e6b6247aaf250f44572c4b458da4aea030ac0268227564e6857200e9c23efe325cfc535f46498cbeccaf46301551efeeb54b062f71d2dcf1ffe71fb8
This commit is contained in:
MacroFake 2022-08-01 11:04:58 +02:00 committed by pasta
parent 2e162da06f
commit da1d3f2654
No known key found for this signature in database
GPG Key ID: E2F3D7916E722D38

View File

@ -102,9 +102,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) {