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,11 +95,11 @@ func CheckChangeSets(genesis *core.Genesis, blockNum uint64, chaindata string, h
|
|||||||
if err := rawdb.WriteReceipts(batch, block.NumberU64(), receipts); err != nil {
|
if err := rawdb.WriteReceipts(batch, block.NumberU64(), receipts); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
if batch.BatchSize() >= batch.IdealBatchSize() {
|
||||||
if batch.BatchSize() >= batch.IdealBatchSize() {
|
log.Info("Committing receipts", "up to block", block.NumberU64(), "batch size", common.StorageSize(batch.BatchSize()))
|
||||||
log.Info("Committing receipts", "up to block", block.NumberU64(), "batch size", common.StorageSize(batch.BatchSize()))
|
if err := batch.CommitAndBegin(context.Background()); err != nil {
|
||||||
if err := batch.CommitAndBegin(context.Background()); err != nil {
|
return err
|
||||||
return err
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user