Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: str4d <[email protected]>
  • Loading branch information
nuttycom and str4d committed Sep 22, 2023
1 parent 78e4fa6 commit d7ec1da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qa/rpc-tests/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def run_test (self):
# the balance returned by the legacy getbalance method is unchanged
assert_equal(
self.nodes[0].z_getbalanceforaccount(acct0)['pools']['transparent']['valueZat'],
Decimal(500000000))
Decimal(5) * COIN)
assert_equal(self.nodes[0].getbalance("*", 1, False, True), pre_balance)

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ UniValue importprivkey(const UniValue& params, bool fHelp)
void ImportAddress(const CTxDestination& dest, const string& strLabel);
void ImportScript(const CScript& script, const string& strLabel, bool isRedeemScript)
{
if (!isRedeemScript && (::IsMine(*pwalletMain, script) & ISMINE_LEGACY_SPENDABLE) != ISMINE_NO)
if (!isRedeemScript && (::IsMine(*pwalletMain, script) & ISMINE_SPENDABLE_ANY) != ISMINE_NO)
throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");

pwalletMain->MarkDirty();
Expand Down
3 changes: 1 addition & 2 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) 2010 Satoshi Nakamoto
//
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2023 The Zcash developers
// Distributed under the MIT software license, see the accompanying
Expand Down Expand Up @@ -1157,7 +1156,7 @@ UniValue getbalance(const UniValue& params, bool fHelp)
"possible.\n"
"NOTE: starting in zcashd v4.7.0, this method incorrectly returned\n"
"transparent value associated with transparent receivers of the wallet's\n"
"unified addresses. This error was corrected in zcashd v5.4.0.\n"
"unified addresses. This error was corrected in zcashd v5.6.0.\n"
"\nArguments:\n"
"1. (dummy) (string, optional) Remains for backward compatibility. Must be excluded or set to \"*\" or \"\".\n"
"2. minconf (numeric, optional, default=0) Only include transactions confirmed at least this many times.\n"
Expand Down

0 comments on commit d7ec1da

Please sign in to comment.