diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-07-11 13:56:13 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-07-11 14:24:36 +0200 |
commit | facd7dd3d1f9d51e1133974ff69eeb48f5ae282b (patch) | |
tree | 8e73b4e97801363108dee58962700e07efa55bf4 /src/wallet | |
parent | 5f96bce9b7f38c687817d58e8b54a5b7ebfe91b3 (diff) | |
download | bitcoin-facd7dd3d1f9d51e1133974ff69eeb48f5ae282b.tar.xz |
wallet: Fix typo in comments; Simplify assert
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/bdb.h | 2 | ||||
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h index 599319482b..9cc42ddc06 100644 --- a/src/wallet/bdb.h +++ b/src/wallet/bdb.h @@ -90,7 +90,7 @@ public: /** Get BerkeleyEnvironment and database filename given a wallet path. */ std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& wallet_path, std::string& database_filename); -/** Return wheter a BDB wallet database is currently loaded. */ +/** Return whether a BDB wallet database is currently loaded. */ bool IsBDBWalletLoaded(const fs::path& wallet_path); /** An instance of this class represents one database. diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 55114a17d7..3304d4ad0b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3141,7 +3141,7 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request) CAmount fee; int change_position; CCoinControl coin_control; - // Automatically select (additional) coins. Can be overriden by options.add_inputs. + // Automatically select (additional) coins. Can be overridden by options.add_inputs. coin_control.m_add_inputs = true; FundTransaction(pwallet, tx, fee, change_position, request.params[1], coin_control); @@ -4075,7 +4075,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request) CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], rbf); CCoinControl coin_control; // Automatically select coins, unless at least one is manually selected. Can - // be overriden by options.add_inputs. + // be overridden by options.add_inputs. coin_control.m_add_inputs = rawTx.vin.size() == 0; FundTransaction(pwallet, rawTx, fee, change_position, request.params[3], coin_control); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 256fd753db..8eec00993f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1437,8 +1437,8 @@ bool CWallet::LoadWalletFlags(uint64_t flags) bool CWallet::AddWalletFlags(uint64_t flags) { LOCK(cs_wallet); - // We should never be writing unknown onon-tolerable wallet flags - assert(!(((flags & KNOWN_WALLET_FLAGS) >> 32) ^ (flags >> 32))); + // We should never be writing unknown non-tolerable wallet flags + assert(((flags & KNOWN_WALLET_FLAGS) >> 32) == (flags >> 32)); if (!WalletBatch(*database).WriteWalletFlags(flags)) { throw std::runtime_error(std::string(__func__) + ": writing wallet flags failed"); } |