diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-06 17:07:25 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-07-09 12:48:05 +0200 |
commit | fa0540cd46eaf44d9e1a9f91c3a937986826c4fa (patch) | |
tree | 1bac883d22116dcb2cf9f65e315de8d1a6c4f148 /test/functional/feature_maxuploadtarget.py | |
parent | f7c19e829eca10ce8b4acafc61264f8bb9b922f3 (diff) |
net: Extract download permission from noban
Diffstat (limited to 'test/functional/feature_maxuploadtarget.py')
-rwxr-xr-x | test/functional/feature_maxuploadtarget.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/functional/feature_maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py index 7eabf86cad..5056b807cb 100755 --- a/test/functional/feature_maxuploadtarget.py +++ b/test/functional/feature_maxuploadtarget.py @@ -137,8 +137,8 @@ class MaxUploadTest(BitcoinTestFramework): self.nodes[0].disconnect_p2ps() - self.log.info("Restarting node 0 with noban permission and 1MB maxuploadtarget") - self.restart_node(0, ["-whitelist=noban@127.0.0.1", "-maxuploadtarget=1"]) + self.log.info("Restarting node 0 with download permission and 1MB maxuploadtarget") + self.restart_node(0, ["-whitelist=download@127.0.0.1", "-maxuploadtarget=1"]) # Reconnect to self.nodes[0] self.nodes[0].add_p2p_connection(TestP2PConn()) @@ -151,9 +151,12 @@ class MaxUploadTest(BitcoinTestFramework): getdata_request.inv = [CInv(MSG_BLOCK, big_old_block)] self.nodes[0].p2p.send_and_ping(getdata_request) - assert_equal(len(self.nodes[0].getpeerinfo()), 1) #node is still connected because of the noban permission - self.log.info("Peer still connected after trying to download old block (noban permission)") + self.log.info("Peer still connected after trying to download old block (download permission)") + peer_info = self.nodes[0].getpeerinfo() + assert_equal(len(peer_info), 1) # node is still connected + assert_equal(peer_info[0]['permissions'], ['download']) + if __name__ == '__main__': MaxUploadTest().main() |