mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 09:42:18 -04:00
Cleanup TCP throttling code (performance) + move connection checks
This commit is contained in:
parent
893916ad09
commit
7e766e13c3
7 changed files with 93 additions and 34 deletions
|
@ -224,6 +224,18 @@ TEST(ban, subnet)
|
|||
test_core pr_core;
|
||||
cryptonote::t_cryptonote_protocol_handler<test_core> cprotocol(pr_core, NULL);
|
||||
Server server(cprotocol);
|
||||
{
|
||||
boost::program_options::options_description opts{};
|
||||
Server::init_options(opts);
|
||||
cryptonote::core::init_options(opts);
|
||||
|
||||
char** args = nullptr;
|
||||
boost::program_options::variables_map vm;
|
||||
boost::program_options::store(
|
||||
boost::program_options::parse_command_line(0, args, opts), vm
|
||||
);
|
||||
server.init(vm);
|
||||
}
|
||||
cprotocol.set_p2p_endpoint(&server);
|
||||
|
||||
ASSERT_TRUE(server.block_subnet(MAKE_IPV4_SUBNET(1,2,3,4,24), 10));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue