Skip to content

Commit e364b2a

Browse files
sdaftuarjnewbery
authored andcommitted
Rename AddInventoryKnown() to AddKnownTx()
1 parent 879a3cf commit e364b2a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ class CNode
969969
}
970970

971971

972-
void AddInventoryKnown(const uint256& hash)
972+
void AddKnownTx(const uint256& hash)
973973
{
974974
if (m_tx_relay != nullptr) {
975975
LOCK(m_tx_relay->cs_tx_inventory);

src/net_processing.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
23682368
best_block = &inv.hash;
23692369
}
23702370
} else {
2371-
pfrom->AddInventoryKnown(inv.hash);
2371+
pfrom->AddKnownTx(inv.hash);
23722372
if (fBlocksOnly) {
23732373
LogPrint(BCLog::NET, "transaction (%s) inv sent in violation of protocol, disconnecting peer=%d\n", inv.hash.ToString(), pfrom->GetId());
23742374
pfrom->fDisconnect = true;
@@ -2615,14 +2615,14 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
26152615
CNodeState* nodestate = State(pfrom->GetId());
26162616

26172617
const uint256& hash = nodestate->m_wtxid_relay ? wtxid : txid;
2618-
pfrom->AddInventoryKnown(hash);
2618+
pfrom->AddKnownTx(hash);
26192619
if (nodestate->m_wtxid_relay && txid != wtxid) {
26202620
// Insert txid into filterInventoryKnown, even for
26212621
// wtxidrelay peers. This prevents re-adding of
26222622
// unconfirmed parents to the recently_announced
26232623
// filter, when a child tx is requested. See
26242624
// ProcessGetData().
2625-
pfrom->AddInventoryKnown(txid);
2625+
pfrom->AddKnownTx(txid);
26262626
}
26272627

26282628
TxValidationState state;
@@ -2689,7 +2689,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
26892689
// Eventually we should replace this with an improved
26902690
// protocol for getting all unconfirmed parents.
26912691
CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
2692-
pfrom->AddInventoryKnown(txin.prevout.hash);
2692+
pfrom->AddKnownTx(txin.prevout.hash);
26932693
if (!AlreadyHave(_inv, mempool)) RequestTx(State(pfrom->GetId()), _inv.hash, current_time);
26942694
}
26952695
}

0 commit comments

Comments
 (0)