diff options
| author | Pieter Wuille <[email protected]> | 2014-09-03 09:25:32 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-09-23 22:29:21 +0200 |
| commit | c9d1a81ce76737a73c9706e074a4fe8440c8277e (patch) | |
| tree | e0632f5b7e27ff788ecfef97e0bfd7d31ef12b21 /src/main.cpp | |
| parent | Use ModifyCoins instead of mutable GetCoins. (diff) | |
| download | discoin-c9d1a81ce76737a73c9706e074a4fe8440c8277e.tar.xz discoin-c9d1a81ce76737a73c9706e074a4fe8440c8277e.zip | |
Get rid of CCoinsView's SetCoins and SetBestBlock.
All direct modifications are now done through ModifyCoins, and BatchWrite is
used for pushing batches of queued modifications up, so we don't need the
low-level SetCoins and SetBestBlock anymore in the top-level CCoinsView class.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5aed3a252..af8810ebd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1753,9 +1753,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C return state.Abort(_("Failed to write transaction index")); // add this block to the view's block chain - bool ret; - ret = view.SetBestBlock(pindex->GetBlockHash()); - assert(ret); + view.SetBestBlock(pindex->GetBlockHash()); int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2; LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001); |