mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-09 08:43:04 +01:00
refactor: rename CTransaction::GetTotalSize to signal that it's not cached
Transaction hashes are cached, it may not be intuitive that their sizes are actually recalculated every time. This is done before the other refactors to clarify why we want to avoid calling this method; Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
This commit is contained in:
@@ -2577,7 +2577,7 @@ void PeerManagerImpl::SendBlockTransactions(CNode& pfrom, Peer& peer, const CBlo
|
||||
return;
|
||||
}
|
||||
resp.txn[i] = block.vtx[req.indexes[i]];
|
||||
tx_requested_size += resp.txn[i]->GetTotalSize();
|
||||
tx_requested_size += resp.txn[i]->ComputeTotalSize();
|
||||
}
|
||||
|
||||
LogDebug(BCLog::CMPCTBLOCK, "Peer %d sent us a GETBLOCKTXN for block %s, sending a BLOCKTXN with %u txns. (%u bytes)\n", pfrom.GetId(), block.GetHash().ToString(), resp.txn.size(), tx_requested_size);
|
||||
|
||||
Reference in New Issue
Block a user