mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-15 23:38:19 +00:00
e3: eth_traceTransaction, eth_replayTransaction, eth_call, ... (#716)
This commit is contained in:
parent
2f2cffd86b
commit
fe5dd317e5
@ -21,6 +21,7 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/ledgerwatch/erigon-lib/common/dbg"
|
||||
@ -372,6 +373,10 @@ func (d *Decompressor) Close() error {
|
||||
}
|
||||
|
||||
func (d *Decompressor) FilePath() string { return d.compressedFile }
|
||||
func (d *Decompressor) FileName() string {
|
||||
_, fName := filepath.Split(d.compressedFile)
|
||||
return fName
|
||||
}
|
||||
|
||||
// WithReadAhead - Expect read in sequential order. (Hence, pages in the given range can be aggressively read ahead, and may be freed soon after they are accessed.)
|
||||
func (d *Decompressor) WithReadAhead(f func() error) error {
|
||||
|
@ -147,11 +147,13 @@ func OpenIndex(indexFile string) (*Index, error) {
|
||||
return idx, nil
|
||||
}
|
||||
|
||||
func (idx *Index) Size() int64 {
|
||||
return idx.size
|
||||
}
|
||||
|
||||
func (idx *Index) Size() int64 { return idx.size }
|
||||
func (idx *Index) BaseDataID() uint64 { return idx.baseDataID }
|
||||
func (idx *Index) FilePath() string { return idx.indexFile }
|
||||
func (idx *Index) FileName() string {
|
||||
_, fName := filepath.Split(idx.indexFile)
|
||||
return fName
|
||||
}
|
||||
|
||||
func (idx *Index) Close() error {
|
||||
if idx == nil {
|
||||
|
@ -425,7 +425,6 @@ func (a *Aggregator22) buildFilesInBackground(ctx context.Context, step uint64,
|
||||
}
|
||||
}()
|
||||
a.integrateFiles(sf, step*a.aggregationStep, (step+1)*a.aggregationStep)
|
||||
log.Info("[snapshots] history build done", "step", fmt.Sprintf("%d-%d", step, step+1))
|
||||
|
||||
closeAll = false
|
||||
return nil
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/ledgerwatch/log/v3"
|
||||
|
||||
@ -270,7 +271,16 @@ func (h *History) staticFilesInRange(r HistoryRanges) (indexFiles, historyFiles
|
||||
}
|
||||
}
|
||||
if r.index && len(indexFiles) != len(historyFiles) {
|
||||
log.Warn("something wrong with files for merge", "idx", fmt.Sprintf("%+v", indexFiles), "hist", fmt.Sprintf("%+v", historyFiles))
|
||||
var sIdx, sHist []string
|
||||
for _, f := range indexFiles {
|
||||
_, fName := filepath.Split(f.index.FilePath())
|
||||
sIdx = append(sIdx, fmt.Sprintf("%+v", fName))
|
||||
}
|
||||
for _, f := range historyFiles {
|
||||
_, fName := filepath.Split(f.decompressor.FilePath())
|
||||
sHist = append(sHist, fmt.Sprintf("%+v", fName))
|
||||
}
|
||||
log.Warn("something wrong with files for merge", "idx", strings.Join(sIdx, ","), "hist", strings.Join(sHist, ","))
|
||||
}
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user