wallet: Fix typo in comments; Simplify assert

This commit is contained in:
MarcoFalke
2020-07-11 13:56:13 +02:00
parent 5f96bce9b7
commit facd7dd3d1
5 changed files with 7 additions and 7 deletions

View File

@@ -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");
}