@@ -1118,10 +1118,10 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
1118
1118
}
1119
1119
}
1120
1120
1121
- void CWallet::SyncTransaction (const CTransactionRef& ptx, const CBlockIndex *pindexBlockConnected , int posInBlock) {
1121
+ void CWallet::SyncTransaction (const CTransactionRef& ptx, const CBlockIndex *pindex , int posInBlock) {
1122
1122
const CTransaction& tx = *ptx;
1123
1123
1124
- if (!AddToWalletIfInvolvingMe (ptx, pindexBlockConnected , posInBlock, true ))
1124
+ if (!AddToWalletIfInvolvingMe (ptx, pindex , posInBlock, true ))
1125
1125
return ; // Not one of ours
1126
1126
1127
1127
// If a transaction changes 'conflicted' state, that changes the balance
@@ -1136,7 +1136,7 @@ void CWallet::SyncTransaction(const CTransactionRef& ptx, const CBlockIndex *pin
1136
1136
1137
1137
void CWallet::TransactionAddedToMempool (const CTransactionRef& ptx) {
1138
1138
LOCK2 (cs_main, cs_wallet);
1139
- SyncTransaction (ptx, NULL , - 1 );
1139
+ SyncTransaction (ptx);
1140
1140
}
1141
1141
1142
1142
void CWallet::BlockConnected (const std::shared_ptr<const CBlock>& pblock, const CBlockIndex *pindex, const std::vector<CTransactionRef>& vtxConflicted) {
@@ -1150,7 +1150,7 @@ void CWallet::BlockConnected(const std::shared_ptr<const CBlock>& pblock, const
1150
1150
// the notification that the conflicted transaction was evicted.
1151
1151
1152
1152
for (const CTransactionRef& ptx : vtxConflicted) {
1153
- SyncTransaction (ptx, NULL , - 1 );
1153
+ SyncTransaction (ptx);
1154
1154
}
1155
1155
for (size_t i = 0 ; i < pblock->vtx .size (); i++) {
1156
1156
SyncTransaction (pblock->vtx [i], pindex, i);
@@ -1161,7 +1161,7 @@ void CWallet::BlockDisconnected(const std::shared_ptr<const CBlock>& pblock) {
1161
1161
LOCK2 (cs_main, cs_wallet);
1162
1162
1163
1163
for (const CTransactionRef& ptx : pblock->vtx ) {
1164
- SyncTransaction (ptx, NULL , - 1 );
1164
+ SyncTransaction (ptx);
1165
1165
}
1166
1166
}
1167
1167
0 commit comments