aboutsummaryrefslogtreecommitdiff
path: root/src/test/denialofservice_tests.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-10-05 13:41:45 -0400
committerCarl Dong <accounts@carldong.me>2019-01-16 13:54:18 -0500
commitd0469b2e9386a7a4b268cb9725347e7517acace6 (patch)
tree77e13e31bd2204de782afafe03c1e71203392c71 /src/test/denialofservice_tests.cpp
parent2e56702ecedd83c4b7cb8de9de5c437c8c08e645 (diff)
banman: pass in default ban time as a parameter
Removes the dependency on arg parsing.
Diffstat (limited to 'src/test/denialofservice_tests.cpp')
-rw-r--r--src/test/denialofservice_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp
index 4a88613a89..29bb34bddc 100644
--- a/src/test/denialofservice_tests.cpp
+++ b/src/test/denialofservice_tests.cpp
@@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
BOOST_AUTO_TEST_CASE(DoS_banning)
{
- auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr);
+ auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);
@@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE(DoS_banning)
BOOST_AUTO_TEST_CASE(DoS_banscore)
{
- auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr);
+ auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);
@@ -318,7 +318,7 @@ BOOST_AUTO_TEST_CASE(DoS_banscore)
BOOST_AUTO_TEST_CASE(DoS_bantime)
{
- auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr);
+ auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);