mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 15:39:05 +01:00
banman: pass the banfile path in
There's no need to hard-code the path here. Passing it in means that there are no ordering concerns wrt establishing the datadir.
This commit is contained in:
@@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(DoS_banning)
|
||||
{
|
||||
auto banman = MakeUnique<BanMan>(nullptr);
|
||||
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr);
|
||||
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>(nullptr);
|
||||
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr);
|
||||
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>(nullptr);
|
||||
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr);
|
||||
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user