mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 11:32:09 +00:00
3d139d35f6
* Validator monitor process slashings * Preston's comment Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * add test for tracked index * Prestons requested changes Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
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)
|
|
}
|