mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
Move batch management into the writeReceipts case (#1321)
This commit is contained in:
parent
ed7dd7acd3
commit
f8477e29ab
@ -95,13 +95,13 @@ func CheckChangeSets(genesis *core.Genesis, blockNum uint64, chaindata string, h
|
||||
if err := rawdb.WriteReceipts(batch, block.NumberU64(), receipts); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if batch.BatchSize() >= batch.IdealBatchSize() {
|
||||
log.Info("Committing receipts", "up to block", block.NumberU64(), "batch size", common.StorageSize(batch.BatchSize()))
|
||||
if err := batch.CommitAndBegin(context.Background()); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !nocheck {
|
||||
accountChanges, err := csw.GetAccountChanges()
|
||||
|
Loading…
Reference in New Issue
Block a user