mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
19 lines
454 B
Go
19 lines
454 B
Go
package cache_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/ledgerwatch/erigon/cl/cltypes/solid"
|
|
"github.com/ledgerwatch/erigon/cl/phase1/cache"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestAttestationsCache(t *testing.T) {
|
|
input := []uint64{1}
|
|
a := solid.NewAttestationData()
|
|
cache.StoreAttestation(&a, []byte{2}, []uint64{1})
|
|
output, valid := cache.LoadAttestatingIndicies(&a, []byte{2})
|
|
require.True(t, valid)
|
|
require.Equal(t, input, output)
|
|
}
|