Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,549 Lines • ▼ Show 20 Lines | bool CWallet::LoadWalletFlags(uint64_t flags) { | ||||
} | } | ||||
m_wallet_flags = flags; | m_wallet_flags = flags; | ||||
return true; | return true; | ||||
} | } | ||||
bool CWallet::AddWalletFlags(uint64_t flags) { | bool CWallet::AddWalletFlags(uint64_t flags) { | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
// We should never be writing unknown onon-tolerable wallet flags | // We should never be writing unknown non-tolerable wallet flags | ||||
assert(!(((flags & KNOWN_WALLET_FLAGS) >> 32) ^ (flags >> 32))); | assert(((flags & KNOWN_WALLET_FLAGS) >> 32) == (flags >> 32)); | ||||
if (!WalletBatch(*database).WriteWalletFlags(flags)) { | if (!WalletBatch(*database).WriteWalletFlags(flags)) { | ||||
throw std::runtime_error(std::string(__func__) + | throw std::runtime_error(std::string(__func__) + | ||||
": writing wallet flags failed"); | ": writing wallet flags failed"); | ||||
} | } | ||||
return LoadWalletFlags(flags); | return LoadWalletFlags(flags); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,549 Lines • Show Last 20 Lines |