mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
25 lines
453 B
Go
25 lines
453 B
Go
package light_client
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/OffchainLabs/prysm/v7/testing/require"
|
|
)
|
|
|
|
func TestLCCache(t *testing.T) {
|
|
lcCache := newLightClientCache()
|
|
require.NotNil(t, lcCache)
|
|
|
|
item := &cacheItem{
|
|
period: 5,
|
|
bestUpdate: nil,
|
|
bestFinalityUpdate: nil,
|
|
}
|
|
|
|
blkRoot := [32]byte{4, 5, 6}
|
|
|
|
lcCache.items[blkRoot] = item
|
|
|
|
require.Equal(t, item, lcCache.items[blkRoot], "Expected to find the item in the cache")
|
|
}
|