cmd/geth, core/rawdb: seamless freezer consistency, friendly removedb

This commit is contained in:
Péter Szilágyi
2019-05-16 14:30:11 +03:00
parent 536b3b416c
commit 9eba3a9fff
10 changed files with 122 additions and 313 deletions

View File

@ -1717,10 +1717,7 @@ func TestIncompleteAncientReceiptChainInsertion(t *testing.T) {
}
// Abort ancient receipt chain insertion deliberately
ancient.terminateInsert = func(hash common.Hash, number uint64) bool {
if number == blocks[len(blocks)/2].NumberU64() {
return true
}
return false
return number == blocks[len(blocks)/2].NumberU64()
}
previousFastBlock := ancient.CurrentFastBlock()
if n, err := ancient.InsertReceiptChain(blocks, receipts, uint64(3*len(blocks)/4)); err == nil {