Skip to content

Commit c765a9c

Browse files
committed
trivial: remove PeerMsgRet handling logic
1 parent 68b7599 commit c765a9c

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,6 @@ class PeerManagerImpl final : public PeerManager
651651
void _RelayTransaction(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
652652

653653
/** Helpers to process result of external handlers of message */
654-
void ProcessPeerMsgRet(const PeerMsgRet& ret, CNode& pfrom) EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
655654
void PostProcessMessage(MessageProcessingResult&& ret, NodeId node) override EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
656655

657656
/** Consider evicting an outbound peer based on the amount of time they've been behind our tip */
@@ -3492,11 +3491,6 @@ void PeerManagerImpl::ProcessBlock(CNode& node, const std::shared_ptr<const CBlo
34923491
}
34933492
}
34943493

3495-
void PeerManagerImpl::ProcessPeerMsgRet(const PeerMsgRet& ret, CNode& pfrom)
3496-
{
3497-
if (!ret) Misbehaving(pfrom.GetId(), ret.error().score, ret.error().message);
3498-
}
3499-
35003494
void PeerManagerImpl::PostProcessMessage(MessageProcessingResult&& result, NodeId node)
35013495
{
35023496
if (result.m_error) {

src/protocol.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <serialize.h>
1212
#include <streams.h>
1313
#include <uint256.h>
14-
#include <util/expected.h>
1514
#include <util/time.h>
1615

1716
#include <cstdint>
@@ -581,9 +580,6 @@ struct MisbehavingError
581580
{}
582581
};
583582

584-
// TODO: replace usages of PeerMsgRet to MessageProcessingResult which is cover this one
585-
using PeerMsgRet = tl::expected<void, MisbehavingError>;
586-
587583
/**
588584
* This struct is a helper to return values from handlers that are processing
589585
* network messages but implemented outside of net_processing.cpp,

0 commit comments

Comments
 (0)