mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
[net processing] Move MaybePunishPeerForTx to PeerManager
This commit is contained in:
parent
e662e2d42a
commit
3115e00f75
2 changed files with 9 additions and 6 deletions
|
|
@ -1182,12 +1182,7 @@ bool PeerManager::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidationSt
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Potentially disconnect and discourage a node based on the contents of a TxValidationState object
|
||||
*
|
||||
* @return Returns true if the peer was punished (probably disconnected)
|
||||
*/
|
||||
static bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message = "")
|
||||
bool PeerManager::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message)
|
||||
{
|
||||
switch (state.GetResult()) {
|
||||
case TxValidationResult::TX_RESULT_UNSET:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue