mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 03:03:58 +01:00
Add facility to store wallet flags (64 bits)
This commit is contained in:
@@ -510,7 +510,11 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
||||
strErr = "Error reading wallet database: SetHDChain failed";
|
||||
return false;
|
||||
}
|
||||
} else if (strType != "bestblock" && strType != "bestblock_nomerkle"){
|
||||
} else if (strType == "flags") {
|
||||
uint64_t flags;
|
||||
ssValue >> flags;
|
||||
pwallet->SetWalletFlags(flags, true);
|
||||
} else if (strType != "bestblock" && strType != "bestblock_nomerkle") {
|
||||
wss.m_unknown_records++;
|
||||
}
|
||||
} catch (...)
|
||||
@@ -840,6 +844,11 @@ bool WalletBatch::WriteHDChain(const CHDChain& chain)
|
||||
return WriteIC(std::string("hdchain"), chain);
|
||||
}
|
||||
|
||||
bool WalletBatch::WriteWalletFlags(const uint64_t flags)
|
||||
{
|
||||
return WriteIC(std::string("flags"), flags);
|
||||
}
|
||||
|
||||
bool WalletBatch::TxnBegin()
|
||||
{
|
||||
return m_batch.TxnBegin();
|
||||
|
||||
Reference in New Issue
Block a user