diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-31 14:57:32 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-31 14:56:17 +0200 |
commit | ffff0d04425a616c14fc4a562e8ef93d286705f8 (patch) | |
tree | 1fe09f283467aa165a518290a90213b11b4a74ef /src/wallet | |
parent | 8c6df2b4ca1da716e2c834f0c3d18345c73c8c2c (diff) |
refactor: Switch serialize to uint8_t (1/n)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/transaction.h | 4 | ||||
-rw-r--r-- | src/wallet/walletdb.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/wallet/transaction.h b/src/wallet/transaction.h index b57ab3db48..131faefe0b 100644 --- a/src/wallet/transaction.h +++ b/src/wallet/transaction.h @@ -204,8 +204,8 @@ public: mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart); } - std::vector<char> dummy_vector1; //!< Used to be vMerkleBranch - std::vector<char> dummy_vector2; //!< Used to be vtxPrev + std::vector<uint8_t> dummy_vector1; //!< Used to be vMerkleBranch + std::vector<uint8_t> dummy_vector2; //!< Used to be vtxPrev bool dummy_bool = false; //!< Used to be fSpent uint256 serializedHash = isAbandoned() ? ABANDON_HASH : m_confirm.hashBlock; int serializedIndex = isAbandoned() || isConflicted() ? -1 : m_confirm.nIndex; diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 3d9248009f..c06b319b0b 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -155,7 +155,7 @@ bool WalletBatch::WriteWatchOnly(const CScript &dest, const CKeyMetadata& keyMet if (!WriteIC(std::make_pair(DBKeys::WATCHMETA, dest), keyMeta)) { return false; } - return WriteIC(std::make_pair(DBKeys::WATCHS, dest), '1'); + return WriteIC(std::make_pair(DBKeys::WATCHS, dest), uint8_t{'1'}); } bool WalletBatch::EraseWatchOnly(const CScript &dest) @@ -308,8 +308,8 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, { if (!ssValue.empty()) { - char fTmp; - char fUnused; + uint8_t fTmp; + uint8_t fUnused; std::string unused_string; ssValue >> fTmp >> fUnused >> unused_string; strErr = strprintf("LoadWallet() upgrading tx ver=%d %d %s", @@ -336,7 +336,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, wss.nWatchKeys++; CScript script; ssKey >> script; - char fYes; + uint8_t fYes; ssValue >> fYes; if (fYes == '1') { pwallet->GetOrCreateLegacyScriptPubKeyMan()->LoadWatchOnly(script); |