erigon-pulse/core/rawdb/accessors_config.go
Alex Sharov 4594ce5ef7
erigon22: history.v2 flag, align rpcdaemon22 (#5016)
* save

* save

* save

* save

* save
2022-08-12 16:13:14 +07:00

16 lines
392 B
Go

package rawdb
import (
"github.com/ledgerwatch/erigon-lib/kv"
)
var historyV2EnabledKey = []byte("history.v2")
func HisoryV2Enabled(tx kv.Tx) (bool, error) {
return kv.GetBool(tx, kv.DatabaseInfo, historyV2EnabledKey)
}
func WriteHisoryV2(tx kv.RwTx, v bool) (bool, error) {
_, enabled, err := kv.EnsureNotChangedBool(tx, kv.DatabaseInfo, historyV2EnabledKey, v)
return enabled, err
}