aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 7de11cc617..4cdfc7d6f5 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -85,6 +85,7 @@ bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
size_t changed = 0;
size_t batch_size = (size_t)GetArg("-dbbatchsize", nDefaultDbBatchSize);
int crash_simulate = GetArg("-dbcrashratio", 0);
+ assert(!hashBlock.IsNull());
uint256 old_tip = GetBestBlock();
if (old_tip.IsNull()) {
@@ -96,13 +97,6 @@ bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
}
}
- if (hashBlock.IsNull()) {
- // Initial flush, nothing to write.
- assert(mapCoins.empty());
- assert(old_tip.IsNull());
- return true;
- }
-
// In the first batch, mark the database as being in the middle of a
// transition from old_tip to hashBlock.
// A vector is used for future extensibility, as we may want to support