mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-27 08:07:22 +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. |
||
|---|---|---|
| .. | ||
| cmd.go | ||
| diskusage.go | ||
| diskusage_openbsd.go | ||
| diskusage_windows.go | ||
| export_test.go | ||
| flags.go | ||
| flags_legacy.go | ||
| flags_test.go | ||
| history_receipts_test.go | ||
| history_test.go | ||
| prompt.go | ||