mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-06 18:01:03 +02:00
test: Remove already resolved assumeutxo todo comments
- "Valid snapshot file, but referencing a snapshot block that turns out to be invalid, or has an invalid parent" has been addressed in #30267 - "An ancestor of snapshot block" - If chain tip refers to blocks in this context then any successful load is addressing this because if we have synced past the snapshot base block we fail because we don't need assumeutxo anymore. And if this is about headers then this is the `test_headers_not_synced()` case. - "A descendant of the snapshot block" - If this refers to blocks the `test_snapshot_with_less_work()` addressed this and if it is just headers in this case again it would be represented in all of the successful loads in the test. Co-authored-by: Alfonso Roman Zubeldia <alfonsoromanz24@gmail.com>
This commit is contained in:
parent
ec74f45741
commit
c2f86d4bcb
@ -11,16 +11,9 @@ The assumeutxo value generated and used here is committed to in
|
||||
|
||||
## Possible test improvements
|
||||
|
||||
Interesting test cases could be loading an assumeutxo snapshot file with:
|
||||
|
||||
- TODO: Valid snapshot file, but referencing a snapshot block that turns out to be
|
||||
invalid, or has an invalid parent
|
||||
|
||||
Interesting starting states could be loading a snapshot when the current chain tip is:
|
||||
|
||||
- TODO: An ancestor of snapshot block
|
||||
- TODO: The snapshot block
|
||||
- TODO: A descendant of the snapshot block
|
||||
|
||||
"""
|
||||
from shutil import rmtree
|
||||
@ -358,6 +351,8 @@ class AssumeutxoTest(BitcoinTestFramework):
|
||||
self.test_snapshot_not_on_most_work_chain(dump_output['path'])
|
||||
|
||||
self.log.info(f"Loading snapshot into second node from {dump_output['path']}")
|
||||
# This node's tip is on an ancestor block of the snapshot, which should
|
||||
# be the normal case
|
||||
loaded = n1.loadtxoutset(dump_output['path'])
|
||||
assert_equal(loaded['coins_loaded'], SNAPSHOT_BASE_HEIGHT)
|
||||
assert_equal(loaded['base_height'], SNAPSHOT_BASE_HEIGHT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user