mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-18 00:50:39 +00:00
Rework ImportHistory to batch up to 2500 consecutive blocks per InsertReceiptChain call, reducing processing overhead. Replace full receipt deserialization with raw RLP-level conversion via GetRawReceiptsByNumber, avoiding allocation of Receipt/Log/Bloom structs and eliminating the decode-reencode round-trip for both era1 and erae formats. Centralize consensus receipt conversion into types.ConvertConsensusReceiptsToStorage (shared by eradb runtime path and import command), and add a new slim receipt converter for the erae format that strips the tx-type field and validates tx/receipt count consistency. Fix resource management by explicitly closing file handles and era objects at each error return instead of relying on defer-in-closure patterns. |
||
|---|---|---|
| .. | ||
| testdata | ||
| eradb.go | ||
| eradb_test.go | ||