mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
22 lines
456 B
Go
22 lines
456 B
Go
|
package monitor
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
types "github.com/prysmaticlabs/eth2-types"
|
||
|
"github.com/prysmaticlabs/prysm/testing/require"
|
||
|
)
|
||
|
|
||
|
func TestTrackedIndex(t *testing.T) {
|
||
|
s := &Service{
|
||
|
config: &ValidatorMonitorConfig{
|
||
|
TrackedValidators: map[types.ValidatorIndex]interface{}{
|
||
|
1: nil,
|
||
|
2: nil,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
require.Equal(t, s.TrackedIndex(types.ValidatorIndex(1)), true)
|
||
|
require.Equal(t, s.TrackedIndex(types.ValidatorIndex(3)), false)
|
||
|
}
|