forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add receiving functional test
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |