mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
46ecf030f5
* Changed slightly archive format (again) * Added all of the remaining rewards endpoints
31 lines
638 B
Go
31 lines
638 B
Go
package state_accessors
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/ledgerwatch/erigon/cl/clparams"
|
|
"github.com/ledgerwatch/erigon/cl/cltypes"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestSlotData(t *testing.T) {
|
|
m := &SlotData{
|
|
Version: clparams.CapellaVersion,
|
|
Eth1Data: &cltypes.Eth1Data{},
|
|
Eth1DepositIndex: 0,
|
|
NextWithdrawalIndex: 0,
|
|
NextWithdrawalValidatorIndex: 0,
|
|
}
|
|
var b bytes.Buffer
|
|
if err := m.WriteTo(&b); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
m2 := &SlotData{}
|
|
if err := m2.ReadFrom(&b); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
require.Equal(t, m, m2)
|
|
}
|