From d0fd71894856faef7170543e9cdcfad4f18ba1df Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Thu, 12 Mar 2026 14:36:55 +0100 Subject: [PATCH] test: Extend named pipe sqlite tool test to use rollback --- test/functional/tool_utxo_to_sqlite.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/functional/tool_utxo_to_sqlite.py b/test/functional/tool_utxo_to_sqlite.py index d3b3fc43439..1c73bd80963 100755 --- a/test/functional/tool_utxo_to_sqlite.py +++ b/test/functional/tool_utxo_to_sqlite.py @@ -77,7 +77,7 @@ class UtxoToSqliteTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 # we want to create some UTXOs with non-standard output scripts - self.extra_args = [['-acceptnonstdtxn=1']] + self.extra_args = [['-acceptnonstdtxn=1', '-coinstatsindex=1']] def skip_test_if_missing_module(self): self.skip_if_no_py_sqlite3() @@ -143,10 +143,12 @@ class UtxoToSqliteTest(BitcoinTestFramework): output_direct_filename = os.path.join(self.options.tmpdir, "utxos_direct.sqlite") p = subprocess.Popen([sys.executable, utxo_to_sqlite_path, fifo_filename, output_direct_filename], stderr=subprocess.STDOUT) - node.dumptxoutset(fifo_filename, "latest") + target_height = node.getblockcount() - 10 + node.dumptxoutset(fifo_filename, "rollback", {"rollback": target_height}) p.wait(timeout=10) muhash_direct_sqlite = calculate_muhash_from_sqlite_utxos(output_direct_filename, "hex", "hex") - assert_equal(muhash_sqlite, muhash_direct_sqlite) + muhash_index = node.gettxoutsetinfo('muhash', target_height)['muhash'] + assert_equal(muhash_index, muhash_direct_sqlite) os.remove(fifo_filename)