|
|
|
@ -20,7 +20,7 @@ FILE_CHARS_DISALLOWED = '/\\?%*:|"<>' if os.name == 'nt' else '/'
|
|
|
|
|
UNCONFIRMED_HASH_STRING = 'unconfirmed'
|
|
|
|
|
|
|
|
|
|
def notify_outputname(walletname, txid):
|
|
|
|
|
return txid if os.name == 'nt' else '{}_{}'.format(walletname, txid)
|
|
|
|
|
return txid if os.name == 'nt' else f'{walletname}_{txid}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class NotificationsTest(BitcoinTestFramework):
|
|
|
|
@ -39,11 +39,11 @@ class NotificationsTest(BitcoinTestFramework):
|
|
|
|
|
|
|
|
|
|
# -alertnotify and -blocknotify on node0, walletnotify on node1
|
|
|
|
|
self.extra_args = [[
|
|
|
|
|
"-alertnotify=echo > {}".format(os.path.join(self.alertnotify_dir, '%s')),
|
|
|
|
|
"-blocknotify=echo > {}".format(os.path.join(self.blocknotify_dir, '%s')),
|
|
|
|
|
f"-alertnotify=echo > {os.path.join(self.alertnotify_dir, '%s')}",
|
|
|
|
|
f"-blocknotify=echo > {os.path.join(self.blocknotify_dir, '%s')}",
|
|
|
|
|
], [
|
|
|
|
|
"-rescan",
|
|
|
|
|
"-walletnotify=echo %h_%b > {}".format(os.path.join(self.walletnotify_dir, notify_outputname('%w', '%s'))),
|
|
|
|
|
f"-walletnotify=echo %h_%b > {os.path.join(self.walletnotify_dir, notify_outputname('%w', '%s'))}",
|
|
|
|
|
]]
|
|
|
|
|
self.wallet_names = [self.default_wallet_name, self.wallet]
|
|
|
|
|
super().setup_network()
|
|
|
|
@ -54,12 +54,12 @@ class NotificationsTest(BitcoinTestFramework):
|
|
|
|
|
seed = "cTdGmKFWpbvpKQ7ejrdzqYT2hhjyb3GPHnLAK7wdi5Em67YLwSm9"
|
|
|
|
|
xpriv = "tprv8ZgxMBicQKsPfHCsTwkiM1KT56RXbGGTqvc2hgqzycpwbHqqpcajQeMRZoBD35kW4RtyCemu6j34Ku5DEspmgjKdt2qe4SvRch5Kk8B8A2v"
|
|
|
|
|
desc_imports = [{
|
|
|
|
|
"desc": descsum_create("wpkh(" + xpriv + "/0/*)"),
|
|
|
|
|
"desc": descsum_create(f"wpkh({xpriv}/0/*)"),
|
|
|
|
|
"timestamp": 0,
|
|
|
|
|
"active": True,
|
|
|
|
|
"keypool": True,
|
|
|
|
|
},{
|
|
|
|
|
"desc": descsum_create("wpkh(" + xpriv + "/1/*)"),
|
|
|
|
|
"desc": descsum_create(f"wpkh({xpriv}/1/*)"),
|
|
|
|
|
"timestamp": 0,
|
|
|
|
|
"active": True,
|
|
|
|
|
"keypool": True,
|
|
|
|
|