No description provided.
[QA] Add walletdump RPC test (including HD- & encryption-tests) #8417
pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2016/07/dump_test changing 2 files +121 −0-
jonasschnelli commented at 1:07 PM on July 28, 2016: contributor
-
[QA] Add walletdump RPC test (including HD- & encryption-tests) 54af51d98d
- jonasschnelli added the label Tests on Jul 28, 2016
-
jonasschnelli commented at 1:07 PM on July 28, 2016: contributor
Fixes #8410
-
MarcoFalke commented at 1:15 PM on July 28, 2016: member
Thanks for adding helpful comments!
Looks good utACK 54af51d98d0b38f08c58dd589bff81883aee2854
On Thu, Jul 28, 2016 at 3:07 PM, Jonas Schnelli notifications@github.com wrote:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub #8417 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AGGmv4IYRv6WKzvpt7bGCNrIuD9M8rNoks5qaKmtgaJpZM4JXMQj .
-
laanwj commented at 3:39 PM on July 29, 2016: member
Thanks, a test for this is very welcome, test code looks good to me utACK 54af51d
- laanwj merged this on Jul 29, 2016
- laanwj closed this on Jul 29, 2016
- laanwj referenced this in commit bbcb8fd884 on Jul 29, 2016
-
in qa/rpc-tests/wallet-dump.py:None in 54af51d98d
0 | @@ -0,0 +1,120 @@ 1 | +#!/usr/bin/env python3 2 | +# Copyright (c) 2016 The Bitcoin Core developers 3 | +# Distributed under the MIT software license, see the accompanying 4 | +# file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | + 6 | +from test_framework.test_framework import BitcoinTestFramework 7 | +from test_framework.util import * 8 | +import os 9 | +import shutil
MarcoFalke commented at 10:40 AM on August 1, 2016:Unused import
in qa/rpc-tests/wallet-dump.py:None in 54af51d98d
38 | + inputfile = open(tmpdir + "/node0/wallet.unencrypted.dump") 39 | + found_addr = 0 40 | + found_addr_chg = 0 41 | + found_addr_rsv = 0 42 | + hdmasteraddr = "" 43 | + for line in inputfile:
MarcoFalke commented at 10:40 AM on August 1, 2016:No need to duplicate this huge for loop
in qa/rpc-tests/wallet-dump.py:None in 54af51d98d
68 | + elif (keytype == "reserve=1"): 69 | + found_addr_rsv+=1 70 | + break 71 | + assert(found_addr == test_addr_count) #all keys must be in the dump 72 | + assert(found_addr_chg == 50) #50 blocks where mined 73 | + assert(found_addr_rsv == 100) #100 reserve keys (keypool)
MarcoFalke commented at 10:41 AM on August 1, 2016:Please use
assert_equal, otherwise it is harder to track down when an issue arisesin qa/rpc-tests/wallet-dump.py:None in 54af51d98d
73 | + assert(found_addr_rsv == 100) #100 reserve keys (keypool) 74 | + 75 | + #encrypt wallet, restart, unlock and dump 76 | + self.nodes[0].encryptwallet('test') 77 | + bitcoind_processes[0].wait() 78 | + self.nodes[0] = start_node(0, self.options.tmpdir)
MarcoFalke commented at 10:42 AM on August 1, 2016:You are starting with the default keypool of
1(for the test framework). This may cause issues in the future.in qa/rpc-tests/wallet-dump.py:None in 54af51d98d
44 | + #only read non comment lines 45 | + if line[0] != "#" and len(line) > 10: 46 | + #split out some data 47 | + keyLabel, comment = line.split("#") 48 | + key = keyLabel.split(" ")[0] 49 | + keytype = keyLabel.split(" ")[2]
MarcoFalke commented at 10:43 AM on August 1, 2016:Nit:
use_lowercase_and_underscorein qa/rpc-tests/wallet-dump.py:None in 54af51d98d
43 | + for line in inputfile: 44 | + #only read non comment lines 45 | + if line[0] != "#" and len(line) > 10: 46 | + #split out some data 47 | + keyLabel, comment = line.split("#") 48 | + key = keyLabel.split(" ")[0]
MarcoFalke commented at 10:43 AM on August 1, 2016:Unused variable
MarcoFalke commented at 10:43 AM on August 1, 2016: memberSorry for the delayed feedback. I will try to create another pull to address those.
luke-jr referenced this in commit f70be14f8f on Sep 21, 2016codablock referenced this in commit 16814bad50 on Sep 19, 2017codablock referenced this in commit fe439a5a6a on Jan 31, 2018codablock referenced this in commit 9282b46fab on Jan 31, 2018codablock referenced this in commit d3e5898ecc on Jan 31, 2018codablock referenced this in commit 9a37add21f on Feb 1, 2018andvgal referenced this in commit e2cc35a6a7 on Jan 6, 2019CryptoCentric referenced this in commit d9423e1746 on Feb 28, 2019CryptoCentric referenced this in commit 0c7c7aa9d5 on Mar 2, 2019DrahtBot locked this on Sep 8, 2021ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me