mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-05 10:32:19 +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 {
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !nocheck {
|
if !nocheck {
|
||||||
accountChanges, err := csw.GetAccountChanges()
|
accountChanges, err := csw.GetAccountChanges()
|
||||||
|
Loading…
Reference in New Issue
Block a user