mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-10 04:51:20 +00:00
e3: agg generalize PutIdx method (#1014)
This commit is contained in:
parent
8f2e5802dd
commit
cf4bdbdf26
@ -1291,20 +1291,19 @@ func (a *AggregatorV3) AddCodePrev(addr []byte, prev []byte) error {
|
||||
return a.code.AddPrevValue(addr, nil, prev)
|
||||
}
|
||||
|
||||
func (a *AggregatorV3) AddTraceFrom(addr []byte) error {
|
||||
return a.tracesFrom.Add(addr)
|
||||
}
|
||||
|
||||
func (a *AggregatorV3) AddTraceTo(addr []byte) error {
|
||||
return a.tracesTo.Add(addr)
|
||||
}
|
||||
|
||||
func (a *AggregatorV3) AddLogAddr(addr []byte) error {
|
||||
return a.logAddrs.Add(addr)
|
||||
}
|
||||
|
||||
func (a *AggregatorV3) AddLogTopic(topic []byte) error {
|
||||
return a.logTopics.Add(topic)
|
||||
func (a *AggregatorV3) PutIdx(idx kv.InvertedIdx, key []byte) error {
|
||||
switch idx {
|
||||
case kv.TracesFromIdx:
|
||||
return a.tracesFrom.Add(key)
|
||||
case kv.TracesToIdx:
|
||||
return a.tracesTo.Add(key)
|
||||
case kv.LogAddressIdx:
|
||||
return a.logAddrs.Add(key)
|
||||
case kv.LogTopicIndex:
|
||||
return a.logTopics.Add(key)
|
||||
default:
|
||||
panic(idx)
|
||||
}
|
||||
}
|
||||
|
||||
// DisableReadAhead - usage: `defer d.EnableReadAhead().DisableReadAhead()`. Please don't use this funcs without `defer` to avoid leak.
|
||||
|
Loading…
Reference in New Issue
Block a user