Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 1,754 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static bool AlreadyHaveBlock(const BlockHash &block_hash) | static bool AlreadyHaveBlock(const BlockHash &block_hash) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | ||||
return LookupBlockIndex(block_hash) != nullptr; | return LookupBlockIndex(block_hash) != nullptr; | ||||
} | } | ||||
static bool AlreadyHaveProof(const avalanche::ProofId &proofid) { | static bool AlreadyHaveProof(const avalanche::ProofId &proofid) { | ||||
// TODO check if the proof is in the orphan pool as well | return g_avalanche && | ||||
return g_avalanche && g_avalanche->getProof(proofid); | (g_avalanche->getProof(proofid) || g_avalanche->getOrphan(proofid)); | ||||
} | } | ||||
void RelayTransaction(const TxId &txid, const CConnman &connman) { | void RelayTransaction(const TxId &txid, const CConnman &connman) { | ||||
connman.ForEachNode( | connman.ForEachNode( | ||||
[&txid](CNode *pnode) { pnode->PushTxInventory(txid); }); | [&txid](CNode *pnode) { pnode->PushTxInventory(txid); }); | ||||
} | } | ||||
void RelayProof(const avalanche::ProofId &proofid, const CConnman &connman) { | void RelayProof(const avalanche::ProofId &proofid, const CConnman &connman) { | ||||
▲ Show 20 Lines • Show All 4,004 Lines • Show Last 20 Lines |