erigon-pulse/cl/clparams/initial_state/initial_state_test.go
Giulio rebuffo c477281362
Caplin: Parallel historical states reconstruction (#8817)
What does this PR do:
* Optional Backfilling and Caplin Archive Node
* Create antiquary for historical states
* Fixed gaps of chain gap related to the Head of the chain and anchor of
the chain.
* Added basic reader object to Read the Historical state
2023-12-06 10:48:36 +01:00

27 lines
871 B
Go

package initial_state_test
import (
"testing"
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/cl/clparams"
"github.com/ledgerwatch/erigon/cl/clparams/initial_state"
"github.com/stretchr/testify/assert"
)
func TestMainnet(t *testing.T) {
state, err := initial_state.GetGenesisState(clparams.MainnetNetwork)
assert.NoError(t, err)
root, err := state.HashSSZ()
assert.NoError(t, err)
assert.Equal(t, libcommon.Hash(root), libcommon.HexToHash("7e76880eb67bbdc86250aa578958e9d0675e64e714337855204fb5abaaf82c2b"))
}
func TestSepolia(t *testing.T) {
state, err := initial_state.GetGenesisState(clparams.SepoliaNetwork)
assert.NoError(t, err)
root, err := state.HashSSZ()
assert.NoError(t, err)
assert.Equal(t, libcommon.Hash(root), libcommon.HexToHash("fb9afe32150fa39f4b346be2519a67e2a4f5efcd50a1dc192c3f6b3d013d2798"))
}