Skip to content

Commit 7945088

Browse files
committed
[Wallet] comsetic non-code changes for the HD feature
1 parent 68d7682 commit 7945088

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

qa/rpc-tests/wallet-hd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def run_test (self):
4747
self.nodes[0].generate(101)
4848
hd_add = None
4949
num_hd_adds = 300
50-
for _ in range(num_hd_adds):
50+
for i in range(num_hd_adds):
5151
hd_add = self.nodes[1].getnewaddress()
5252
hd_info = self.nodes[1].validateaddress(hd_add)
53-
assert_equal(hd_info["hdkeypath"], "m/0'/0'/"+str(_+1)+"'")
53+
assert_equal(hd_info["hdkeypath"], "m/0'/0'/"+str(i+1)+"'")
5454
assert_equal(hd_info["hdmasterkeyid"], masterkeyid)
5555
self.nodes[0].sendtoaddress(hd_add, 1)
5656
self.nodes[0].generate(1)

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
22692269
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
22702270
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
22712271
" \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n"
2272-
" \"masterkeyid\": \"<hash160>\", (string) the Hash160 of the hd master pubkey\n"
2272+
" \"masterkeyid\": \"<hash160>\", (string) the Hash160 of the HD master pubkey\n"
22732273
"}\n"
22742274
"\nExamples:\n"
22752275
+ HelpExampleCli("getwalletinfo", "")
@@ -2291,7 +2291,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
22912291
obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK())));
22922292
CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID;
22932293
if (!masterKeyID.IsNull())
2294-
obj.push_back(Pair("masterkeyid",masterKeyID.GetHex()));
2294+
obj.push_back(Pair("masterkeyid", masterKeyID.GetHex()));
22952295
return obj;
22962296
}
22972297

src/wallet/wallet.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
577577

578578
void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>);
579579

580-
/* the hd chain data model (external chain counters) */
580+
/* the HD chain data model (external chain counters) */
581581
CHDChain hdChain;
582582

583583
public:
@@ -896,10 +896,10 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
896896

897897
bool BackupWallet(const std::string& strDest);
898898

899-
/* Set the hd chain model (chain child index counters) */
899+
/* Set the HD chain model (chain child index counters) */
900900
bool SetHDChain(const CHDChain& chain, bool memonly);
901901

902-
/* Set the current hd master key (will reset the chain child index counters) */
902+
/* Set the current HD master key (will reset the chain child index counters) */
903903
bool SetHDMasterKey(const CKey& key);
904904
const CHDChain& GetHDChain() { return hdChain; }
905905
};

src/wallet/walletdb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ enum DBErrors
4141
DB_NEED_REWRITE
4242
};
4343

44-
/* simple hd chain data model */
44+
/* simple HD chain data model */
4545
class CHDChain
4646
{
4747
public:
@@ -79,7 +79,7 @@ class CKeyMetadata
7979
int nVersion;
8080
int64_t nCreateTime; // 0 means unknown
8181
std::string hdKeypath; //optional HD/bip32 keypath
82-
CKeyID hdMasterKeyID; //id of the hd masterkey used to derive this key
82+
CKeyID hdMasterKeyID; //id of the HD masterkey used to derive this key
8383

8484
CKeyMetadata()
8585
{

0 commit comments

Comments
 (0)