test: Make requires_wallet private

The bool is only used to call a public helper, which some tests already
do. So use the public helper in all tests consistently and make the
confusingly named bool private.
This commit is contained in:
MacroFake
2022-11-10 10:12:39 +01:00
parent 9dce30194b
commit fa68937b89
5 changed files with 8 additions and 12 deletions

View File

@@ -17,8 +17,6 @@ MAX_INITIAL_BROADCAST_DELAY = 15 * 60 # 15 minutes in seconds
class MempoolUnbroadcastTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
if self.is_wallet_compiled():
self.requires_wallet = True
def run_test(self):
self.wallet = MiniWallet(self.nodes[0])
@@ -35,6 +33,7 @@ class MempoolUnbroadcastTest(BitcoinTestFramework):
self.log.info("Generate transactions that only node 0 knows about")
if self.is_wallet_compiled():
self.import_deterministic_coinbase_privkeys()
# generate a wallet txn
addr = node.getnewaddress()
wallet_tx_hsh = node.sendtoaddress(addr, 0.0001)