Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_maxuploadtarget.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test behavior of -maxuploadtarget. | """Test behavior of -maxuploadtarget. | ||||
* Verify that getdata requests for old blocks (>1week) are dropped | * Verify that getdata requests for old blocks (>1week) are dropped | ||||
if uploadtarget has been reached. | if uploadtarget has been reached. | ||||
* Verify that getdata requests for recent blocks are respecteved even | * Verify that getdata requests for recent blocks are respected even | ||||
if uploadtarget has been reached. | if uploadtarget has been reached. | ||||
* Verify that the upload counters are reset after 24 hours. | * Verify that the upload counters are reset after 24 hours. | ||||
""" | """ | ||||
from collections import defaultdict | from collections import defaultdict | ||||
import time | import time | ||||
from test_framework.cdefs import LEGACY_MAX_BLOCK_SIZE | from test_framework.cdefs import LEGACY_MAX_BLOCK_SIZE | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |