diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 03cd127a7da..6c18ef47ab5 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -280,6 +280,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): rpc_logger.removeHandler(h) if cleanup_tree_on_exit: shutil.rmtree(self.options.tmpdir) + + self.nodes.clear() return exit_code # Methods to override in subclass test scripts.