mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Merge bitcoin/bitcoin#23336: refactor: Make GenTxid boolean constructor private
fa4ec1c0bdMake GenTxid boolean constructor private (MarcoFalke)faeb9a5753remove unused CTxMemPool::info(const uint256& txid) (MarcoFalke) Pull request description: This boolean argument is either verbose (when used with a named arg) or unintuitive and dangerous (when used as a plain bool). Fix that by making the constructor private. ACKs for top commit: laanwj: Code review ACKfa4ec1c0bdjnewbery: Code review ACKfa4ec1c0bdglozow: code review ACKfa4ec1c0bdTree-SHA512: bf08ee09168885cfda71e5a01ec412b93964662a90dd9d91e75f7fdf2eaff7c21a95204d0e90b00438bfeab564d0aea66bdb9c0394ee7a05743e65a817159446
This commit is contained in:
@@ -3243,7 +3243,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
// already; and an adversary can already relay us old transactions
|
||||
// (older than our recency filter) if trying to DoS us, without any need
|
||||
// for witness malleation.
|
||||
if (AlreadyHaveTx(GenTxid(/* is_wtxid=*/true, wtxid))) {
|
||||
if (AlreadyHaveTx(GenTxid::Wtxid(wtxid))) {
|
||||
if (pfrom.HasPermission(NetPermissionFlags::ForceRelay)) {
|
||||
// Always relay transactions received from peers with forcerelay
|
||||
// permission, even if they were already in the mempool, allowing
|
||||
@@ -3313,7 +3313,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
// wtxidrelay peers.
|
||||
// Eventually we should replace this with an improved
|
||||
// protocol for getting all unconfirmed parents.
|
||||
const GenTxid gtxid{/* is_wtxid=*/false, parent_txid};
|
||||
const auto gtxid{GenTxid::Txid(parent_txid)};
|
||||
pfrom.AddKnownTx(parent_txid);
|
||||
if (!AlreadyHaveTx(gtxid)) AddTxAnnouncement(pfrom, gtxid, current_time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user