diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index 376e35da3b6..fef2e9d02c6 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2021 The Bitcoin Core developers +# Copyright (c) 2021-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test for assumeutxo, a means of quickly bootstrapping a node using @@ -17,8 +17,7 @@ Interesting test cases could be loading an assumeutxo snapshot file with: -- TODO: An invalid hash -- TODO: Valid hash but invalid snapshot file (bad coin height or truncated file or +- TODO: Valid hash but invalid snapshot file (bad coin height or bad other serialization) - TODO: Valid snapshot file, but referencing an unknown block - TODO: Valid snapshot file, but referencing a snapshot block that turns out to be @@ -40,7 +39,6 @@ assert_equal, assert_raises_rpc_error, ) -import struct START_HEIGHT = 199 SNAPSHOT_BASE_HEIGHT = 299 @@ -81,17 +79,25 @@ def test_invalid_snapshot_scenarios(self, valid_snapshot_path): assert_raises_rpc_error(-32603, f"Unable to load UTXO snapshot, {error_details}", self.nodes[1].loadtxoutset, bad_snapshot_path) self.log.info(" - snapshot file with wrong number of coins") - valid_num_coins = struct.unpack("