diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 6e12f6c9641ce..32a2667facf53 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -812,10 +812,10 @@ def __getattr__(self, name): def createwallet_passthrough(self, *args, **kwargs): return self.__getattr__("createwallet")(*args, **kwargs) - def createwallet(self, wallet_name, disable_private_keys=None, blank=None, passphrase='', avoid_reuse=None, descriptors=None, load_on_startup=None, external_signer=None): + def createwallet(self, wallet_name, disable_private_keys=None, blank=None, passphrase='', avoid_reuse=None, descriptors=None, load_on_startup=None, external_signer=None, silent_payment=None): if descriptors is None: descriptors = self.descriptors - return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer) + return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer, silent_payment) def importprivkey(self, privkey, label=None, rescan=None): wallet_info = self.getwalletinfo() diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index db04bb8bdb3ff..05dfc1ad0a36c 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -105,6 +105,7 @@ 'feature_maxuploadtarget.py', 'mempool_updatefromblock.py', 'mempool_persist.py --descriptors', + 'wallet_silentpayments_receiving.py', # vv Tests less than 60s vv 'rpc_psbt.py --legacy-wallet', 'rpc_psbt.py --descriptors', diff --git a/test/functional/wallet_silentpayments_receiving.py b/test/functional/wallet_silentpayments_receiving.py new file mode 100755 index 0000000000000..b6d971fbb0fe0 --- /dev/null +++ b/test/functional/wallet_silentpayments_receiving.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +from test_framework.test_framework import BitcoinTestFramework +from test_framework.descriptors import descsum_create + + +class SilentTransactioTest(BitcoinTestFramework): + def add_options(self, parser): + self.add_wallet_options(parser) + + def set_test_params(self): + self.setup_clean_chain = True + self.num_nodes = 3 + self.extra_args = [[], ["-txindex=1"], []] + + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + self.skip_if_no_sqlite() + + def init_wallet(self, *, node): + pass + + def create_silent_payments_wallet(self): + + self.nodes[0].createwallet(wallet_name='sp', descriptors=True, silent_payment=True) + sp_wallet = self.nodes[0].get_wallet_rpc('sp') + address = sp_wallet.getnewaddress(address_type="silent-payment") + assert address + + def run_test(self): + self.create_silent_payments_wallet() + + +if __name__ == '__main__': + SilentTransactioTest().main()