aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-07-27 15:33:03 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2015-12-04 09:18:53 +0100
commit7d0bf0bb4652fad052d5bf3ca3bf883754b46ead (patch)
tree21f66c55be4e532bf52ce39373a7e5a92c45fbcb /src/main.cpp
parent5548d9cb11c8e66fa4913aba5e7d28acc2c5a9d0 (diff)
downloadbitcoin-7d0bf0bb4652fad052d5bf3ca3bf883754b46ead.tar.xz
include the chaintip *blockIndex in the SyncTransaction signal
- allows reducing of calls to main.cpp for getting the chaintip during transaction syncing - potentially allows reducing of cs_main locks
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bfa71a7292..be14dec1cf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1234,7 +1234,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
}
}
- SyncWithWallets(tx, NULL);
+ SyncWithWallets(tx, NULL, NULL);
return true;
}
@@ -2391,7 +2391,7 @@ bool static DisconnectTip(CValidationState& state, const Consensus::Params& cons
// Let wallets know transactions went from 1-confirmed to
// 0-confirmed or conflicted:
BOOST_FOREACH(const CTransaction &tx, block.vtx) {
- SyncWithWallets(tx, NULL);
+ SyncWithWallets(tx, pindexDelete->pprev, NULL);
}
return true;
}
@@ -2450,11 +2450,11 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
// Tell wallet about transactions that went from mempool
// to conflicted:
BOOST_FOREACH(const CTransaction &tx, txConflicted) {
- SyncWithWallets(tx, NULL);
+ SyncWithWallets(tx, pindexNew, NULL);
}
// ... and about transactions that got confirmed:
BOOST_FOREACH(const CTransaction &tx, pblock->vtx) {
- SyncWithWallets(tx, pblock);
+ SyncWithWallets(tx, pindexNew, pblock);
}
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;