aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Dobson <dobsonsa68@gmail.com>2020-07-12 13:20:43 +1200
committerSamuel Dobson <dobsonsa68@gmail.com>2020-07-12 13:34:37 +1200
commit32302e5c88ef990b2eca0561bb6be38cdbc11ec3 (patch)
tree049225cc26fe7e39ed61498025fdb95fd12ee289
parent42fe6aad326f62c7e6ea12ee873149257f67ce5d (diff)
parentfacd7dd3d1f9d51e1133974ff69eeb48f5ae282b (diff)
downloadbitcoin-32302e5c88ef990b2eca0561bb6be38cdbc11ec3.tar.xz
Merge #19490: wallet: Fix typo in comments; Simplify assert
facd7dd3d1f9d51e1133974ff69eeb48f5ae282b wallet: Fix typo in comments; Simplify assert (MarcoFalke) Pull request description: Follow up to https://github.com/bitcoin/bitcoin/pull/19046#discussion_r443783101 and https://github.com/bitcoin/bitcoin/pull/19046#discussion_r443793690 ACKs for top commit: practicalswift: ACK facd7dd3d1f9d51e1133974ff69eeb48f5ae282b jonatack: ACK facd7dd3d1f9d51e1133974ff69eeb48f5ae282b hebasto: ACK facd7dd3d1f9d51e1133974ff69eeb48f5ae282b, spelling verified with `test/lint/lint-spelling.sh`: all remaining warnings are false positive. Tree-SHA512: 2b185d138058840db56726bb6bcc42e5288a954e2a410c49e04806a047fbbdaf0bb2decc70ecf7613c69caa766655705ca44151613e7ea5015b386d1e726d870
-rw-r--r--src/test/data/script_tests.json2
-rw-r--r--src/test/descriptor_tests.cpp2
-rw-r--r--src/wallet/bdb.h2
-rw-r--r--src/wallet/rpcwallet.cpp4
-rw-r--r--src/wallet/wallet.cpp4
5 files changed, 7 insertions, 7 deletions
diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json
index c01ef307b7..724789bbf9 100644
--- a/src/test/data/script_tests.json
+++ b/src/test/data/script_tests.json
@@ -678,7 +678,7 @@
["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", "", "OK"],
["While not really correctly DER encoded, the empty signature is allowed by"],
-["STRICTENC to provide a compact way to provide a delibrately invalid signature."],
+["STRICTENC to provide a compact way to provide a deliberately invalid signature."],
["0", "0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 CHECKSIG NOT", "STRICTENC", "OK"],
["0 0", "1 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 1 CHECKMULTISIG NOT", "STRICTENC", "OK"],
diff --git a/src/test/descriptor_tests.cpp b/src/test/descriptor_tests.cpp
index 5d7065dafb..20132d5782 100644
--- a/src/test/descriptor_tests.cpp
+++ b/src/test/descriptor_tests.cpp
@@ -135,7 +135,7 @@ void DoCheck(const std::string& prv, const std::string& pub, int flags, const st
// When the descriptor is hardened, evaluate with access to the private keys inside.
const FlatSigningProvider& key_provider = (flags & HARDENED) ? keys_priv : keys_pub;
- // Evaluate the descriptor selected by `t` in poisition `i`.
+ // Evaluate the descriptor selected by `t` in position `i`.
FlatSigningProvider script_provider, script_provider_cached;
std::vector<CScript> spks, spks_cached;
DescriptorCache desc_cache;
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");
}