236 | @@ -237,6 +237,9 @@ def run_test(self):
237 | # will allow us to test n1's sync-to-tip on top of a snapshot.
238 | self.generate(n0, nblocks=100, sync_fun=self.no_op)
239 |
240 | + with n0.assert_debug_log(expected_msgs=["[snapshot] activation failed - work does not exceed active chainstate","[snapshot] activation failed - population failed"]):
241 | + assert_raises_rpc_error(-32603, "Unable to load UTXO snapshot", n0.loadtxoutset, dump_output['path'])
Also made a temporary modification to this expected message. Mismatch was caught (as expected).
@kevkevinpal We are loading the snapshot of n0 in n0 itslelf? Should it not be loaded into n1?
Thank you for the review!
yes, we should be able to remove that TODO: (removed in ac1b0e3)
I used n0 instead of n1 because if we use n1 it will properly work because n1 is not synced up yet. So I used n0 to loadtxoutset of a chainstate which is certain to be older than its current chainstate
I see, though it seemed unusual initially that we are loading a snapshot in the same node. But now that I think more about it - this can happen in a real world scenario as well, right? Eg: When the node is re-started after a long time and needs to catch up to the latest blocks.