Fix wallet and bigint C++20 build regressions
This commit is contained in:
+1
-1
@@ -1692,7 +1692,7 @@ int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees)
|
||||
bnSubsidy /= 365;
|
||||
bnSubsidy /= COIN;
|
||||
|
||||
int64_t nSubsidy = bnSubsidy.getint64();
|
||||
int64_t nSubsidy = bnSubsidy.getuint64();
|
||||
|
||||
|
||||
if (fDebug && GetBoolArg("-printcreation"))
|
||||
|
||||
+2
-2
@@ -100,8 +100,8 @@ public:
|
||||
|
||||
CWallet()
|
||||
{
|
||||
nWalletVersion = WalletFeature::Base;
|
||||
nWalletMaxVersion = WalletFeature::Base;
|
||||
nWalletVersion = static_cast<int>(WalletFeature::Base);
|
||||
nWalletMaxVersion = static_cast<int>(WalletFeature::Base);
|
||||
fFileBacked = false;
|
||||
nMasterKeyMaxID = 0;
|
||||
pwalletdbEncryption = nullptr;
|
||||
|
||||
+14
-14
@@ -110,10 +110,10 @@ public:
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
|
||||
if(!Write({std::string("keymeta"), vchPubKey}, keyMeta))
|
||||
if(!Write(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta))
|
||||
return false;
|
||||
|
||||
return Write({std::string("key"), vchPubKey.Raw()}, vchPrivKey, false);
|
||||
return Write(std::make_pair(std::string("key"), vchPubKey.Raw()), vchPrivKey, false);
|
||||
}
|
||||
|
||||
bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret, const CKeyMetadata &keyMeta)
|
||||
@@ -121,15 +121,15 @@ public:
|
||||
nWalletDBUpdated++;
|
||||
bool fEraseUnencryptedKey = true;
|
||||
|
||||
if(!Write({std::string("keymeta"), vchPubKey}, keyMeta))
|
||||
if(!Write(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta))
|
||||
return false;
|
||||
|
||||
if (!Write({std::string("ckey"), vchPubKey.Raw()}, vchCryptedSecret, false))
|
||||
if (!Write(std::make_pair(std::string("ckey"), vchPubKey.Raw()), vchCryptedSecret, false))
|
||||
return false;
|
||||
if (fEraseUnencryptedKey)
|
||||
{
|
||||
Erase({std::string("key"), vchPubKey.Raw()});
|
||||
Erase({std::string("wkey"), vchPubKey.Raw()});
|
||||
Erase(std::make_pair(std::string("key"), vchPubKey.Raw()));
|
||||
Erase(std::make_pair(std::string("wkey"), vchPubKey.Raw()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -137,13 +137,13 @@ public:
|
||||
bool WriteMasterKey(unsigned int nID, const CMasterKey& kMasterKey)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write({std::string("mkey"), nID}, kMasterKey, true);
|
||||
return Write(std::make_pair(std::string("mkey"), nID), kMasterKey, true);
|
||||
}
|
||||
|
||||
bool WriteCScript(const uint160& hash, const CScript& redeemScript)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write({std::string("cscript"), hash}, redeemScript, false);
|
||||
return Write(std::make_pair(std::string("cscript"), hash), redeemScript, false);
|
||||
}
|
||||
|
||||
bool WriteBestBlock(const CBlockLocator& locator)
|
||||
@@ -171,19 +171,19 @@ public:
|
||||
|
||||
bool ReadPool(int64_t nPool, CKeyPool& keypool)
|
||||
{
|
||||
return Read({std::string("pool"), nPool}, keypool);
|
||||
return Read(std::make_pair(std::string("pool"), nPool), keypool);
|
||||
}
|
||||
|
||||
bool WritePool(int64_t nPool, const CKeyPool& keypool)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write({std::string("pool"), nPool}, keypool);
|
||||
return Write(std::make_pair(std::string("pool"), nPool), keypool);
|
||||
}
|
||||
|
||||
bool ErasePool(int64_t nPool)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Erase({std::string("pool"), nPool});
|
||||
return Erase(std::make_pair(std::string("pool"), nPool));
|
||||
}
|
||||
|
||||
// Settings are no longer stored in wallet.dat; these are
|
||||
@@ -191,18 +191,18 @@ public:
|
||||
template<typename T>
|
||||
bool ReadSetting(const std::string& strKey, T& value)
|
||||
{
|
||||
return Read({std::string("setting"), strKey}, value);
|
||||
return Read(std::make_pair(std::string("setting"), strKey), value);
|
||||
}
|
||||
template<typename T>
|
||||
bool WriteSetting(const std::string& strKey, const T& value)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write({std::string("setting"), strKey}, value);
|
||||
return Write(std::make_pair(std::string("setting"), strKey), value);
|
||||
}
|
||||
bool EraseSetting(const std::string& strKey)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Erase({std::string("setting"), strKey});
|
||||
return Erase(std::make_pair(std::string("setting"), strKey));
|
||||
}
|
||||
|
||||
bool WriteMinVersion(int nVersion)
|
||||
|
||||
Reference in New Issue
Block a user