Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
251sync_fun=self.no_op,252))253self.log.debug(f"Syncing {len(block_hashes)} new blocks...")254self.sync_node3blocks(block_hashes)255self.wallet.rescan_utxos()256utxo_list = self.wallet.get_utxos()257self.log.debug(f"MiniWallet utxo count: {len(utxo_list)}")259# Check that the utxo hashes agree with node3260# Useful side effect: each utxo cache gets flushed here, so that we261# won't get crashes on shutdown at the end of the test.262self.verify_utxo_hash()264# Check the test coverage265self.log.info(f"Restarted nodes: {self.restart_counts}; crashes on restart: {self.crashed_on_restart}")267# If no nodes were restarted, we didn't test anything.268assert_not_equal(self.restart_counts, [0, 0, 0])270# Make sure we tested the case of crash-during-recovery.271assert self.crashed_on_restart > 0273# Warn if any of the nodes escaped restart.274for i in range(3):275if self.restart_counts[i] == 0:276self.log.warning(f"Node {i} never crashed during utxo flush!")279if __name__ == "__main__":280ChainstateWriteCrashTest(__file__).main()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.