mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-11 15:56:58 -04:00
Rename AddInventoryKnown() to AddKnownTx()
This commit is contained in:
parent
4eb515574e
commit
dd78d1d641
2 changed files with 5 additions and 5 deletions
|
@ -965,7 +965,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddInventoryKnown(const uint256& hash)
|
void AddKnownTx(const uint256& hash)
|
||||||
{
|
{
|
||||||
if (m_tx_relay != nullptr) {
|
if (m_tx_relay != nullptr) {
|
||||||
LOCK(m_tx_relay->cs_tx_inventory);
|
LOCK(m_tx_relay->cs_tx_inventory);
|
||||||
|
|
|
@ -2661,7 +2661,7 @@ void ProcessMessage(
|
||||||
best_block = &inv.hash;
|
best_block = &inv.hash;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pfrom.AddInventoryKnown(inv.hash);
|
pfrom.AddKnownTx(inv.hash);
|
||||||
if (fBlocksOnly) {
|
if (fBlocksOnly) {
|
||||||
LogPrint(BCLog::NET, "transaction (%s) inv sent in violation of protocol, disconnecting peer=%d\n", inv.hash.ToString(), pfrom.GetId());
|
LogPrint(BCLog::NET, "transaction (%s) inv sent in violation of protocol, disconnecting peer=%d\n", inv.hash.ToString(), pfrom.GetId());
|
||||||
pfrom.fDisconnect = true;
|
pfrom.fDisconnect = true;
|
||||||
|
@ -2908,14 +2908,14 @@ void ProcessMessage(
|
||||||
CNodeState* nodestate = State(pfrom.GetId());
|
CNodeState* nodestate = State(pfrom.GetId());
|
||||||
|
|
||||||
const uint256& hash = nodestate->m_wtxid_relay ? wtxid : txid;
|
const uint256& hash = nodestate->m_wtxid_relay ? wtxid : txid;
|
||||||
pfrom.AddInventoryKnown(hash);
|
pfrom.AddKnownTx(hash);
|
||||||
if (nodestate->m_wtxid_relay && txid != wtxid) {
|
if (nodestate->m_wtxid_relay && txid != wtxid) {
|
||||||
// Insert txid into filterInventoryKnown, even for
|
// Insert txid into filterInventoryKnown, even for
|
||||||
// wtxidrelay peers. This prevents re-adding of
|
// wtxidrelay peers. This prevents re-adding of
|
||||||
// unconfirmed parents to the recently_announced
|
// unconfirmed parents to the recently_announced
|
||||||
// filter, when a child tx is requested. See
|
// filter, when a child tx is requested. See
|
||||||
// ProcessGetData().
|
// ProcessGetData().
|
||||||
pfrom.AddInventoryKnown(txid);
|
pfrom.AddKnownTx(txid);
|
||||||
}
|
}
|
||||||
|
|
||||||
TxValidationState state;
|
TxValidationState state;
|
||||||
|
@ -2982,7 +2982,7 @@ void ProcessMessage(
|
||||||
// Eventually we should replace this with an improved
|
// Eventually we should replace this with an improved
|
||||||
// protocol for getting all unconfirmed parents.
|
// protocol for getting all unconfirmed parents.
|
||||||
CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
|
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);
|
if (!AlreadyHave(_inv, mempool)) RequestTx(State(pfrom.GetId()), _inv.hash, current_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue