Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
Show First 20 Lines • Show All 344 Lines • ▼ Show 20 Lines | def assert_start_raises_init_error(self, extra_args=None, expected_msg=None, match=ErrorMatch.FULL_TEXT, *args, **kwargs): | ||||
'Expected message "{}" does not fully match stderr:\n"{}"'.format(expected_msg, stderr)) | 'Expected message "{}" does not fully match stderr:\n"{}"'.format(expected_msg, stderr)) | ||||
else: | else: | ||||
if expected_msg is None: | if expected_msg is None: | ||||
assert_msg = "bitcoind should have exited with an error" | assert_msg = "bitcoind should have exited with an error" | ||||
else: | else: | ||||
assert_msg = "bitcoind should have exited with expected error " + expected_msg | assert_msg = "bitcoind should have exited with expected error " + expected_msg | ||||
self._raise_assertion_error(assert_msg) | self._raise_assertion_error(assert_msg) | ||||
def node_encrypt_wallet(self, passphrase): | |||||
""""Encrypts the wallet. | |||||
This causes bitcoind to shutdown, so this method takes | |||||
care of cleaning up resources.""" | |||||
self.encryptwallet(passphrase) | |||||
self.wait_until_stopped() | |||||
def relay_fee(self, cached=True): | def relay_fee(self, cached=True): | ||||
if not self.relay_fee_cache or not cached: | if not self.relay_fee_cache or not cached: | ||||
self.relay_fee_cache = self.getnetworkinfo()["relayfee"] | self.relay_fee_cache = self.getnetworkinfo()["relayfee"] | ||||
return self.relay_fee_cache | return self.relay_fee_cache | ||||
def calculate_fee(self, tx): | def calculate_fee(self, tx): | ||||
""" Estimate the necessary fees (in sats) for an unsigned CTransaction assuming: | """ Estimate the necessary fees (in sats) for an unsigned CTransaction assuming: | ||||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |