banman: create and split out banman

Some say he has always been.
This commit is contained in:
Cory Fields
2017-10-05 13:10:58 -04:00
committed by Carl Dong
parent 83c1ea2e5e
commit 4c0d961eb0
10 changed files with 172 additions and 125 deletions

View File

@@ -23,9 +23,11 @@ static constexpr bool DEFAULT_ENABLE_BIP61{false};
class PeerLogicValidation final : public CValidationInterface, public NetEventsInterface {
private:
CConnman* const connman;
BanMan* const m_banman;
bool SendRejectsAndCheckIfBanned(CNode* pnode, bool enable_bip61) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
public:
explicit PeerLogicValidation(CConnman* connman, CScheduler &scheduler, bool enable_bip61);
PeerLogicValidation(CConnman* connman, BanMan* banman, CScheduler &scheduler, bool enable_bip61);
/**
* Overridden from CValidationInterface.