Skip to content

Commit 4b26ca0

Browse files
committed
Merge bitcoin/bitcoin#32502: wallet: Drop unused fFromMe from CWalletTx
5bf91ba wallet: Drop unused fFromMe from CWalletTx (David Gumberg) Pull request description: This has been unused since commit fe52346, this is a re-opening of #9351. ACKs for top commit: maflcko: lgtm ACK 5bf91ba achow101: ACK 5bf91ba Tree-SHA512: b9a84f27b6cfe7796dcf629be6a8e01a97d931ea81ef088951d54d6691ffe79d22138baacc632375093cf3176a22c265e30a80f1f63c3bc620d08bf16f6a488f
2 parents d5786bc + 5bf91ba commit 4b26ca0

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/wallet/transaction.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ class CWalletTx
215215
* CWallet::ComputeTimeSmart().
216216
*/
217217
unsigned int nTimeSmart;
218-
/**
219-
* From me flag is set to 1 for transactions that were created by the wallet
220-
* on this bitcoin node, and set to 0 for transactions that were created
221-
* externally and came in through the network or sendrawtransaction RPC.
222-
*/
223-
bool fFromMe;
224218
int64_t nOrderPos; //!< position in ordered transaction list
225219
std::multimap<int64_t, CWalletTx*>::const_iterator m_it_wtxOrdered;
226220

@@ -249,7 +243,6 @@ class CWalletTx
249243
fTimeReceivedIsTxTime = false;
250244
nTimeReceived = 0;
251245
nTimeSmart = 0;
252-
fFromMe = false;
253246
fChangeCached = false;
254247
nChangeCached = 0;
255248
nOrderPos = -1;
@@ -281,10 +274,10 @@ class CWalletTx
281274

282275
std::vector<uint8_t> dummy_vector1; //!< Used to be vMerkleBranch
283276
std::vector<uint8_t> dummy_vector2; //!< Used to be vtxPrev
284-
bool dummy_bool = false; //!< Used to be fSpent
277+
bool dummy_bool = false; //!< Used to be fFromMe and fSpent
285278
uint256 serializedHash = TxStateSerializedBlockHash(m_state);
286279
int serializedIndex = TxStateSerializedIndex(m_state);
287-
s << TX_WITH_WITNESS(tx) << serializedHash << dummy_vector1 << serializedIndex << dummy_vector2 << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime << nTimeReceived << fFromMe << dummy_bool;
280+
s << TX_WITH_WITNESS(tx) << serializedHash << dummy_vector1 << serializedIndex << dummy_vector2 << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime << nTimeReceived << dummy_bool << dummy_bool;
288281
}
289282

290283
template<typename Stream>
@@ -294,10 +287,10 @@ class CWalletTx
294287

295288
std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch
296289
std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev
297-
bool dummy_bool; //! Used to be fSpent
290+
bool dummy_bool; //! Used to be fFromMe and fSpent
298291
uint256 serialized_block_hash;
299292
int serializedIndex;
300-
s >> TX_WITH_WITNESS(tx) >> serialized_block_hash >> dummy_vector1 >> serializedIndex >> dummy_vector2 >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> fFromMe >> dummy_bool;
293+
s >> TX_WITH_WITNESS(tx) >> serialized_block_hash >> dummy_vector1 >> serializedIndex >> dummy_vector2 >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> dummy_bool >> dummy_bool;
301294

302295
m_state = TxStateInterpretSerialized({serialized_block_hash, serializedIndex});
303296

src/wallet/wallet.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
753753
// fTimeReceivedIsTxTime not copied on purpose
754754
// nTimeReceived not copied on purpose
755755
copyTo->nTimeSmart = copyFrom->nTimeSmart;
756-
copyTo->fFromMe = copyFrom->fFromMe;
757756
// nOrderPos not copied on purpose
758757
// cached members not copied on purpose
759758
}
@@ -2242,7 +2241,6 @@ void CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::ve
22422241
wtx.mapValue = std::move(mapValue);
22432242
wtx.vOrderForm = std::move(orderForm);
22442243
wtx.fTimeReceivedIsTxTime = true;
2245-
wtx.fFromMe = true;
22462244
return true;
22472245
});
22482246

0 commit comments

Comments
 (0)