diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json --- a/src/test/data/script_tests.json +++ b/src/test/data/script_tests.json @@ -722,7 +722,7 @@ ["0x02 0x0000", "CHECKSEQUENCEVERIFY DROP 1", "CHECKSEQUENCEVERIFY", "UNSATISFIED_LOCKTIME", "fails because tx version < 2, not from nonminimal encoding"], ["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"], ["0", "0x02 0xBEEF CHECKSIG NOT", "STRICTENC", "PUBKEYTYPE", "Even with a null signature, the public key has to be correctly encoded."], diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1555,8 +1555,8 @@ 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");