Skip to content

Commit facd7dd

Browse files
author
MarcoFalke
committedJul 11, 2020
wallet: Fix typo in comments; Simplify assert
1 parent 5f96bce commit facd7dd

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed
 

‎src/test/data/script_tests.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@
678678
["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", "", "OK"],
679679

680680
["While not really correctly DER encoded, the empty signature is allowed by"],
681-
["STRICTENC to provide a compact way to provide a delibrately invalid signature."],
681+
["STRICTENC to provide a compact way to provide a deliberately invalid signature."],
682682
["0", "0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 CHECKSIG NOT", "STRICTENC", "OK"],
683683
["0 0", "1 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 1 CHECKMULTISIG NOT", "STRICTENC", "OK"],
684684

‎src/test/descriptor_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void DoCheck(const std::string& prv, const std::string& pub, int flags, const st
135135
// When the descriptor is hardened, evaluate with access to the private keys inside.
136136
const FlatSigningProvider& key_provider = (flags & HARDENED) ? keys_priv : keys_pub;
137137

138-
// Evaluate the descriptor selected by `t` in poisition `i`.
138+
// Evaluate the descriptor selected by `t` in position `i`.
139139
FlatSigningProvider script_provider, script_provider_cached;
140140
std::vector<CScript> spks, spks_cached;
141141
DescriptorCache desc_cache;

‎src/wallet/bdb.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class BerkeleyEnvironment
9090
/** Get BerkeleyEnvironment and database filename given a wallet path. */
9191
std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& wallet_path, std::string& database_filename);
9292

93-
/** Return wheter a BDB wallet database is currently loaded. */
93+
/** Return whether a BDB wallet database is currently loaded. */
9494
bool IsBDBWalletLoaded(const fs::path& wallet_path);
9595

9696
/** An instance of this class represents one database.

‎src/wallet/rpcwallet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3141,7 +3141,7 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request)
31413141
CAmount fee;
31423142
int change_position;
31433143
CCoinControl coin_control;
3144-
// Automatically select (additional) coins. Can be overriden by options.add_inputs.
3144+
// Automatically select (additional) coins. Can be overridden by options.add_inputs.
31453145
coin_control.m_add_inputs = true;
31463146
FundTransaction(pwallet, tx, fee, change_position, request.params[1], coin_control);
31473147

@@ -4075,7 +4075,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
40754075
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], rbf);
40764076
CCoinControl coin_control;
40774077
// Automatically select coins, unless at least one is manually selected. Can
4078-
// be overriden by options.add_inputs.
4078+
// be overridden by options.add_inputs.
40794079
coin_control.m_add_inputs = rawTx.vin.size() == 0;
40804080
FundTransaction(pwallet, rawTx, fee, change_position, request.params[3], coin_control);
40814081

‎src/wallet/wallet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,8 @@ bool CWallet::LoadWalletFlags(uint64_t flags)
14371437
bool CWallet::AddWalletFlags(uint64_t flags)
14381438
{
14391439
LOCK(cs_wallet);
1440-
// We should never be writing unknown onon-tolerable wallet flags
1441-
assert(!(((flags & KNOWN_WALLET_FLAGS) >> 32) ^ (flags >> 32)));
1440+
// We should never be writing unknown non-tolerable wallet flags
1441+
assert(((flags & KNOWN_WALLET_FLAGS) >> 32) == (flags >> 32));
14421442
if (!WalletBatch(*database).WriteWalletFlags(flags)) {
14431443
throw std::runtime_error(std::string(__func__) + ": writing wallet flags failed");
14441444
}

0 commit comments

Comments
 (0)