mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 19:41:19 +00:00
bca221bf85
* verkle stuff * added verkle writer * added more stuff to verkle trees * added tool for incremental prom. * lint Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
20 lines
378 B
Go
20 lines
378 B
Go
package main
|
|
|
|
import (
|
|
"encoding/binary"
|
|
|
|
"github.com/ledgerwatch/erigon-lib/kv"
|
|
"github.com/ledgerwatch/erigon/common"
|
|
)
|
|
|
|
func ReadVerkleIncarnation(tx kv.Tx, address common.Address) (uint64, error) {
|
|
inc, err := tx.GetOne(VerkleIncarnation, address[:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
if len(inc) == 0 {
|
|
return 0, nil
|
|
}
|
|
return binary.BigEndian.Uint64(inc), nil
|
|
}
|