mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-10 21:11:20 +00:00
Recreate bitmap in call traces (#2700)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
parent
8d9e058eb7
commit
836d7e07f9
@ -179,13 +179,13 @@ func promoteCallTraces(logPrefix string, tx kv.RwTx, startBlock, endBlock uint64
|
||||
}
|
||||
|
||||
func finaliseCallTraces(collectorFrom, collectorTo *etl.Collector, logPrefix string, tx kv.RwTx, quit <-chan struct{}) error {
|
||||
var currentBitmap = roaring64.New()
|
||||
var buf = bytes.NewBuffer(nil)
|
||||
lastChunkKey := make([]byte, 128)
|
||||
reader := bytes.NewReader(nil)
|
||||
reader2 := bytes.NewReader(nil)
|
||||
var loaderFunc = func(k []byte, v []byte, table etl.CurrentTableReader, next etl.LoadNextFunc) error {
|
||||
reader.Reset(v)
|
||||
currentBitmap := roaring64.New()
|
||||
if _, err := currentBitmap.ReadFrom(reader); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -215,7 +215,6 @@ func finaliseCallTraces(collectorFrom, collectorTo *etl.Collector, logPrefix str
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
currentBitmap.Clear()
|
||||
return nil
|
||||
}
|
||||
if err := collectorFrom.Load(logPrefix, tx, kv.CallFromIndex, loaderFunc, etl.TransformArgs{Quit: quit}); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user