diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-07-09 17:02:20 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-07-09 17:03:27 +0200 |
commit | cc9d09e73de0fa5639bd782166b171448fd6b90b (patch) | |
tree | a319e9e3eb1d1cb2db6d3a3305e1173033de372e /src/test/netbase_tests.cpp | |
parent | 0d69fdb9a0e3edab45f2749cf026afe509a550e9 (diff) | |
parent | fa0540cd46eaf44d9e1a9f91c3a937986826c4fa (diff) |
Merge #19191: net: Extract download permission from noban
fa0540cd46eaf44d9e1a9f91c3a937986826c4fa net: Extract download permission from noban (MarcoFalke)
Pull request description:
It should be possible to grant nodes in a local network (e.g. home, university, enterprise, ...) permission to download blocks even after the maxuploadtarget is hit.
Currently this is only possible by setting the `noban` permission, which has some adverse effects, especially if the peers can't be fully trusted.
Fix this by extracting a `download` permission from `noban`.
ACKs for top commit:
jonatack:
ACK fa0540c
Sjors:
re-utACK fa0540cd46eaf44d9e1a9f91c3a937986826c4fa
Tree-SHA512: 255566baa43ae925d93f5d0a3aa66b475a556d1590f662a88278a4872f16a1a05739a6119ae48a293011868042e05cb264cffe5822a50fb80db7333bf44376d9
Diffstat (limited to 'src/test/netbase_tests.cpp')
-rw-r--r-- | src/test/netbase_tests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp index 0fbf257f0e..c4d5d0b6d0 100644 --- a/src/test/netbase_tests.cpp +++ b/src/test/netbase_tests.cpp @@ -397,12 +397,13 @@ BOOST_AUTO_TEST_CASE(netpermissions_test) BOOST_CHECK(NetWhitelistPermissions::TryParse("bloom,forcerelay,noban,relay,mempool@1.2.3.4/32", whitelistPermissions, error)); const auto strings = NetPermissions::ToStrings(PF_ALL); - BOOST_CHECK_EQUAL(strings.size(), 5U); + BOOST_CHECK_EQUAL(strings.size(), 6U); BOOST_CHECK(std::find(strings.begin(), strings.end(), "bloomfilter") != strings.end()); BOOST_CHECK(std::find(strings.begin(), strings.end(), "forcerelay") != strings.end()); BOOST_CHECK(std::find(strings.begin(), strings.end(), "relay") != strings.end()); BOOST_CHECK(std::find(strings.begin(), strings.end(), "noban") != strings.end()); BOOST_CHECK(std::find(strings.begin(), strings.end(), "mempool") != strings.end()); + BOOST_CHECK(std::find(strings.begin(), strings.end(), "download") != strings.end()); } BOOST_AUTO_TEST_CASE(netbase_dont_resolve_strings_with_embedded_nul_characters) |