Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ BITCOIN_CORE_H = \
txdb.h \
txmempool.h \
txorphanage.h \
txrequest.h \
undo.h \
unordered_lru_cache.h \
util/asmap.h \
Expand Down Expand Up @@ -648,6 +649,7 @@ libbitcoin_node_a_SOURCES = \
txdb.cpp \
txmempool.cpp \
txorphanage.cpp \
txrequest.cpp \
validation.cpp \
validationinterface.cpp \
versionbits.cpp \
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ BITCOIN_TESTS =\
test/txindex_tests.cpp \
test/txpackage_tests.cpp \
test/txreconciliation_tests.cpp \
test/txrequest_tests.cpp \
test/txvalidation_tests.cpp \
test/txvalidationcache_tests.cpp \
test/uint256_tests.cpp \
Expand Down Expand Up @@ -380,6 +381,7 @@ test_fuzz_fuzz_SOURCES = \
test/fuzz/tx_out.cpp \
test/fuzz/tx_pool.cpp \
test/fuzz/txorphan.cpp \
test/fuzz/txrequest.cpp \
test/fuzz/utxo_snapshot.cpp \
test/fuzz/utxo_total_supply.cpp \
test/fuzz/validation_load_mempool.cpp \
Expand Down
1 change: 1 addition & 0 deletions src/coinjoin/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ void CCoinJoinServer::ProcessDSQUEUE(NodeId from, CDataStream& vRecv)
LogPrint(BCLog::COINJOIN, "DSQUEUE -- new CoinJoin queue, masternode=%s, queue=%s\n", dmn->proTxHash.ToString(), dsq.ToString());

if (!m_queueman.TryAddQueue(dsq)) return;
WITH_LOCK(cs_main, m_peer_manager->PeerForgetObjectRequest(CInv{MSG_DSQ, dsq.GetHash()}));
m_peer_manager->PeerRelayDSQ(dsq);
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/governance/net_governance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ void NetGovernance::ProcessMessage(CNode& peer, const std::string& msg_type, CDa
return;
}

if (!WITH_LOCK(::cs_main, return m_gov_manager.ProcessObject(peer.GetLogString(), nHash, govobj))) {
if (WITH_LOCK(::cs_main, return m_gov_manager.ProcessObject(peer.GetLogString(), nHash, govobj))) {
WITH_LOCK(::cs_main, m_peer_manager->PeerForgetObjectRequest(CInv{MSG_GOVERNANCE_OBJECT, nHash}));
} else {
// apply node's ban score
m_peer_manager->PeerMisbehaving(peer.GetId(), 20);
}
Expand Down Expand Up @@ -244,6 +246,7 @@ void NetGovernance::ProcessMessage(CNode& peer, const std::string& msg_type, CDa
uint256 hashToRequest;
if (m_gov_manager.ProcessVote(vote, exception, hashToRequest)) {
LogPrint(BCLog::GOBJECT, "MNGOVERNANCEOBJECTVOTE -- %s new\n", strHash);
WITH_LOCK(::cs_main, m_peer_manager->PeerForgetObjectRequest(CInv{MSG_GOVERNANCE_OBJECT_VOTE, nHash}));
m_node_sync.BumpAssetLastTime("MNGOVERNANCEOBJECTVOTE");

if (!m_node_sync.IsSynced()) {
Expand Down
2 changes: 2 additions & 0 deletions src/instantsend/net_instantsend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ void NetInstantSend::ProcessMessage(CNode& pfrom, const std::string& msg_type, C
islock->txid.ToString(), hash.ToString(), from);

m_is_manager.EnqueueInstantSendLock(from, hash, std::move(islock));
// Enqueued locks count as AlreadyHave, no need to request them from anyone anymore.
WITH_LOCK(::cs_main, m_peer_manager->PeerForgetObjectRequest(CInv{MSG_ISDLOCK, hash}));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/msg_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct MessageProcessingResult
//! @m_transactions will relay transactions to peers which is ready to accept it (some peers does not accept transactions)
std::vector<uint256> m_transactions;

//! @m_to_erase triggers EraseObjectRequest from PeerManager for this inventory if not nullopt
//! @m_to_erase completes the sending peer's pending request for this inventory if not nullopt
std::optional<CInv> m_to_erase;

MessageProcessingResult() = default;
Expand Down
1 change: 0 additions & 1 deletion src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <crypto/siphash.h>
#include <hash.h>
#include <i2p.h>
#include <limitedmap.h>
#include <net_permissions.h>
#include <netaddress.h>
#include <netbase.h>
Expand Down
Loading