Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_encryption.py
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
-13, "Please enter the wallet passphrase with walletpassphrase first", | -13, "Please enter the wallet passphrase with walletpassphrase first", | ||||
self.nodes[0].dumpprivkey, address) | self.nodes[0].dumpprivkey, address) | ||||
# Check that walletpassphrase works | # Check that walletpassphrase works | ||||
self.nodes[0].walletpassphrase(passphrase, 2) | self.nodes[0].walletpassphrase(passphrase, 2) | ||||
assert_equal(privkey, self.nodes[0].dumpprivkey(address)) | assert_equal(privkey, self.nodes[0].dumpprivkey(address)) | ||||
# Check that the timeout is right | # Check that the timeout is right | ||||
time.sleep(2) | time.sleep(3) | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
-13, "Please enter the wallet passphrase with walletpassphrase first", | -13, "Please enter the wallet passphrase with walletpassphrase first", | ||||
self.nodes[0].dumpprivkey, address) | self.nodes[0].dumpprivkey, address) | ||||
# Test wrong passphrase | # Test wrong passphrase | ||||
assert_raises_rpc_error(-14, "wallet passphrase entered was incorrect", | assert_raises_rpc_error(-14, "wallet passphrase entered was incorrect", | ||||
self.nodes[0].walletpassphrase, passphrase + "wrong", 10) | self.nodes[0].walletpassphrase, passphrase + "wrong", 10) | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |