mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 04:21:20 +00:00
4594ce5ef7
* save * save * save * save * save
16 lines
392 B
Go
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
|
|
}
|