prysm-pulse/beacon-chain/operations/slashings/service_test.go

22 lines
516 B
Go
Raw Normal View History

package slashings
import (
"testing"
"github.com/prysmaticlabs/prysm/beacon-chain/operations/slashings/mock"
"github.com/prysmaticlabs/prysm/testing/require"
)
var (
_ = PoolManager(&Pool{})
_ = PoolInserter(&Pool{})
_ = PoolManager(&mock.PoolMock{})
_ = PoolInserter(&mock.PoolMock{})
)
func TestPool_validatorSlashingPreconditionCheck_requiresLock(t *testing.T) {
p := &Pool{}
_, err := p.validatorSlashingPreconditionCheck(nil, 0)
require.ErrorContains(t, "caller must hold read/write lock", err)
}