mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 10:24:40 +02:00
wallet: Remove unused fTimeReceivedIsTxTime
fTimeReceivedIsTxTime has been unused unused since 0.3.24
This commit is contained in:
@ -203,7 +203,6 @@ public:
|
||||
*/
|
||||
mapValue_t mapValue;
|
||||
std::vector<std::pair<std::string, std::string> > vOrderForm;
|
||||
unsigned int fTimeReceivedIsTxTime;
|
||||
unsigned int nTimeReceived; //!< time received by this node
|
||||
/**
|
||||
* Stable timestamp that never changes, and reflects the order a transaction
|
||||
@ -240,7 +239,6 @@ public:
|
||||
{
|
||||
mapValue.clear();
|
||||
vOrderForm.clear();
|
||||
fTimeReceivedIsTxTime = false;
|
||||
nTimeReceived = 0;
|
||||
nTimeSmart = 0;
|
||||
fChangeCached = false;
|
||||
@ -274,10 +272,11 @@ public:
|
||||
|
||||
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 fFromMe and fSpent
|
||||
bool dummy_bool = false; //!< Used to be fFromMe, and fSpent
|
||||
uint32_t dummy_int = 0; // Used to be fTimeReceivedIsTxTime
|
||||
uint256 serializedHash = TxStateSerializedBlockHash(m_state);
|
||||
int serializedIndex = TxStateSerializedIndex(m_state);
|
||||
s << TX_WITH_WITNESS(tx) << serializedHash << dummy_vector1 << serializedIndex << dummy_vector2 << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime << nTimeReceived << dummy_bool << dummy_bool;
|
||||
s << TX_WITH_WITNESS(tx) << serializedHash << dummy_vector1 << serializedIndex << dummy_vector2 << mapValueCopy << vOrderForm << dummy_int << nTimeReceived << dummy_bool << dummy_bool;
|
||||
}
|
||||
|
||||
template<typename Stream>
|
||||
@ -287,10 +286,11 @@ public:
|
||||
|
||||
std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch
|
||||
std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev
|
||||
bool dummy_bool; //! Used to be fFromMe and fSpent
|
||||
bool dummy_bool; //! Used to be fFromMe, and fSpent
|
||||
uint32_t dummy_int; // Used to be fTimeReceivedIsTxTime
|
||||
uint256 serialized_block_hash;
|
||||
int serializedIndex;
|
||||
s >> TX_WITH_WITNESS(tx) >> serialized_block_hash >> dummy_vector1 >> serializedIndex >> dummy_vector2 >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> dummy_bool >> dummy_bool;
|
||||
s >> TX_WITH_WITNESS(tx) >> serialized_block_hash >> dummy_vector1 >> serializedIndex >> dummy_vector2 >> mapValue >> vOrderForm >> dummy_int >> nTimeReceived >> dummy_bool >> dummy_bool;
|
||||
|
||||
m_state = TxStateInterpretSerialized({serialized_block_hash, serializedIndex});
|
||||
|
||||
|
@ -726,7 +726,6 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
|
||||
if (!copyFrom->IsEquivalentTo(*copyTo)) continue;
|
||||
copyTo->mapValue = copyFrom->mapValue;
|
||||
copyTo->vOrderForm = copyFrom->vOrderForm;
|
||||
// fTimeReceivedIsTxTime not copied on purpose
|
||||
// nTimeReceived not copied on purpose
|
||||
copyTo->nTimeSmart = copyFrom->nTimeSmart;
|
||||
// nOrderPos not copied on purpose
|
||||
@ -2227,7 +2226,6 @@ void CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::ve
|
||||
CHECK_NONFATAL(wtx.vOrderForm.empty());
|
||||
wtx.mapValue = std::move(mapValue);
|
||||
wtx.vOrderForm = std::move(orderForm);
|
||||
wtx.fTimeReceivedIsTxTime = true;
|
||||
return true;
|
||||
});
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ static DBErrors LoadTxRecords(CWallet* pwallet, DatabaseBatch& batch, std::vecto
|
||||
// Load tx record
|
||||
any_unordered = false;
|
||||
LoadResult tx_res = LoadRecords(pwallet, batch, DBKeys::TX,
|
||||
[&any_unordered, &upgraded_txs] (CWallet* pwallet, DataStream& key, DataStream& value, std::string& err) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet) {
|
||||
[&any_unordered] (CWallet* pwallet, DataStream& key, DataStream& value, std::string& err) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet) {
|
||||
DBErrors result = DBErrors::LOAD_OK;
|
||||
Txid hash;
|
||||
key >> hash;
|
||||
@ -1030,27 +1030,6 @@ static DBErrors LoadTxRecords(CWallet* pwallet, DatabaseBatch& batch, std::vecto
|
||||
if (wtx.GetHash() != hash)
|
||||
return false;
|
||||
|
||||
// Undo serialize changes in 31600
|
||||
if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703)
|
||||
{
|
||||
if (!value.empty())
|
||||
{
|
||||
uint8_t fTmp;
|
||||
uint8_t fUnused;
|
||||
std::string unused_string;
|
||||
value >> fTmp >> fUnused >> unused_string;
|
||||
pwallet->WalletLogPrintf("LoadWallet() upgrading tx ver=%d %d %s\n",
|
||||
wtx.fTimeReceivedIsTxTime, fTmp, hash.ToString());
|
||||
wtx.fTimeReceivedIsTxTime = fTmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
pwallet->WalletLogPrintf("LoadWallet() repairing tx ver=%d %s\n", wtx.fTimeReceivedIsTxTime, hash.ToString());
|
||||
wtx.fTimeReceivedIsTxTime = 0;
|
||||
}
|
||||
upgraded_txs.push_back(hash);
|
||||
}
|
||||
|
||||
if (wtx.nOrderPos == -1)
|
||||
any_unordered = true;
|
||||
|
||||
|
Reference in New Issue
Block a user