@@ -957,9 +957,9 @@ bool CWallet::LoadToWallet(const CWalletTx& wtxIn)
957
957
/* *
958
958
* Add a transaction to the wallet, or update it. pIndex and posInBlock should
959
959
* be set when the transaction was known to be included in a block. When
960
- * posInBlock = SYNC_TRANSACTION_NOT_IN_BLOCK (-1) , then wallet state is not
961
- * updated in AddToWallet, but notifications happen and cached balances are
962
- * marked dirty.
960
+ * pIndex == NULL , then wallet state is not updated in AddToWallet, but
961
+ * notifications happen and cached balances are marked dirty.
962
+ *
963
963
* If fUpdate is true, existing transactions will be updated.
964
964
* TODO: One exception to this is that the abandoned state is cleared under the
965
965
* assumption that any further notification of a transaction that was considered
@@ -973,7 +973,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransactionRef& ptx, const CBlockI
973
973
{
974
974
AssertLockHeld (cs_wallet);
975
975
976
- if (posInBlock != - 1 ) {
976
+ if (pIndex != NULL ) {
977
977
BOOST_FOREACH (const CTxIn& txin, tx.vin ) {
978
978
std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range = mapTxSpends.equal_range (txin.prevout );
979
979
while (range.first != range.second ) {
@@ -993,7 +993,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransactionRef& ptx, const CBlockI
993
993
CWalletTx wtx (this , ptx);
994
994
995
995
// Get merkle branch if transaction was found in a block
996
- if (posInBlock != - 1 )
996
+ if (pIndex != NULL )
997
997
wtx.SetMerkleBranch (pIndex, posInBlock);
998
998
999
999
return AddToWallet (wtx, false );
0 commit comments