aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-10-11 10:49:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-10-11 10:54:05 +0200
commitfef65c4f5e5994722265be327433218bece900c5 (patch)
tree336cb60d790a9b86c5d23764d8bbf18c498501ca /test/functional/test_framework
parent0e3a411351578d8cb372407205b320dcb72279c4 (diff)
parenteff4bd8ab257a553ca8898ccd803630b4d44a771 (diff)
downloadbitcoin-fef65c4f5e5994722265be327433218bece900c5.tar.xz
Merge #11113: [net] Ignore getheaders requests for very old side blocks
eff4bd8 [test] P2P functional test for certain fingerprinting protections (Jim Posen) a2be3b6 [net] Ignore getheaders requests for very old side blocks (Jim Posen) Pull request description: Sending a getheaders message with an empty locator and a stop hash is a request for a single header by hash. The node will respond with headers for blocks not in the main chain as well as those in the main chain. To avoid fingerprinting, the node should, however, ignore requests for headers on side branches that are too old. This replicates the logic that currently exists for `getdata` requests for blocks. Tree-SHA512: e04ef61e2b73945be6ec5977b3c5680b6dc3667246f8bfb67afae1ecaba900c0b49b18bbbb74869f7a37ef70b6ed99e78ebe0ea0a1569369fad9e447d720ffc4
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/mininode.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py
index d072969d7f..c6f596156a 100755
--- a/test/functional/test_framework/mininode.py
+++ b/test/functional/test_framework/mininode.py
@@ -1310,8 +1310,8 @@ class msg_getheaders(object):
class msg_headers(object):
command = b"headers"
- def __init__(self):
- self.headers = []
+ def __init__(self, headers=None):
+ self.headers = headers if headers is not None else []
def deserialize(self, f):
# comment in bitcoind indicates these should be deserialized as blocks