Skip to content

Commit

Permalink
Rename AddInventoryKnown() to AddKnownTx()
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaftuar committed Jul 19, 2020
1 parent 4eb5155 commit dd78d1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ class CNode
}


void AddInventoryKnown(const uint256& hash)
void AddKnownTx(const uint256& hash)
{
if (m_tx_relay != nullptr) {
LOCK(m_tx_relay->cs_tx_inventory);
Expand Down
8 changes: 4 additions & 4 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2661,7 +2661,7 @@ void ProcessMessage(
best_block = &inv.hash;
}
} else {
pfrom.AddInventoryKnown(inv.hash);
pfrom.AddKnownTx(inv.hash);
if (fBlocksOnly) {
LogPrint(BCLog::NET, "transaction (%s) inv sent in violation of protocol, disconnecting peer=%d\n", inv.hash.ToString(), pfrom.GetId());
pfrom.fDisconnect = true;
Expand Down Expand Up @@ -2908,14 +2908,14 @@ void ProcessMessage(
CNodeState* nodestate = State(pfrom.GetId());

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

TxValidationState state;
Expand Down Expand Up @@ -2982,7 +2982,7 @@ void ProcessMessage(
// Eventually we should replace this with an improved
// protocol for getting all unconfirmed parents.
CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
pfrom.AddInventoryKnown(txin.prevout.hash);
pfrom.AddKnownTx(txin.prevout.hash);
if (!AlreadyHave(_inv, mempool)) RequestTx(State(pfrom.GetId()), _inv.hash, current_time);
}
}
Expand Down

0 comments on commit dd78d1d

Please sign in to comment.