Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_descriptor.py
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.log.info("Test sending and receiving") | self.log.info("Test sending and receiving") | ||||
addr = recv_wrpc.getnewaddress() | addr = recv_wrpc.getnewaddress() | ||||
send_wrpc.sendtoaddress(addr, 10) | send_wrpc.sendtoaddress(addr, 10) | ||||
# Make sure things are disabled | # Make sure things are disabled | ||||
self.log.info("Test disabled RPCs") | self.log.info("Test disabled RPCs") | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.importprivkey, | recv_wrpc.rpc.importprivkey, | ||||
"cVpF924EspNh8KjYsfhgY96mmxvT6DgdWiTYMtMjuM74hJaU5psW") | "cVpF924EspNh8KjYsfhgY96mmxvT6DgdWiTYMtMjuM74hJaU5psW") | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.importpubkey, | recv_wrpc.rpc.importpubkey, | ||||
send_wrpc.getaddressinfo(send_wrpc.getnewaddress())) | send_wrpc.getaddressinfo(send_wrpc.getnewaddress())) | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.importaddress, | recv_wrpc.rpc.importaddress, | ||||
recv_wrpc.getnewaddress()) | recv_wrpc.getnewaddress()) | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.importmulti, | recv_wrpc.rpc.importmulti, | ||||
[]) | []) | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.addmultisigaddress, | recv_wrpc.rpc.addmultisigaddress, | ||||
1, | 1, | ||||
[recv_wrpc.getnewaddress()]) | [recv_wrpc.getnewaddress()]) | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.dumpprivkey, | recv_wrpc.rpc.dumpprivkey, | ||||
recv_wrpc.getnewaddress()) | recv_wrpc.getnewaddress()) | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.dumpwallet, | recv_wrpc.rpc.dumpwallet, | ||||
'wallet.dump') | 'wallet.dump') | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.importwallet, | recv_wrpc.rpc.importwallet, | ||||
'wallet.dump') | 'wallet.dump') | ||||
assert_raises_rpc_error(-4, | assert_raises_rpc_error(-4, | ||||
"This type of wallet does not support this command", | "This type of wallet does not support this command", | ||||
recv_wrpc.sethdseed) | recv_wrpc.rpc.sethdseed) | ||||
self.log.info("Test encryption") | self.log.info("Test encryption") | ||||
# Get the master fingerprint before encrypt | # Get the master fingerprint before encrypt | ||||
info1 = send_wrpc.getaddressinfo(send_wrpc.getnewaddress()) | info1 = send_wrpc.getaddressinfo(send_wrpc.getnewaddress()) | ||||
# Encrypt wallet 0 | # Encrypt wallet 0 | ||||
send_wrpc.encryptwallet('pass') | send_wrpc.encryptwallet('pass') | ||||
send_wrpc.walletpassphrase('pass', 10) | send_wrpc.walletpassphrase('pass', 10) | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |