prysm-pulse/beacon-chain/operations/slashings/service_test.go
Raul Jordan 9edba29f64
Slasher Simulator Code for Testing Optimized Slasher Behavior (#9695)
* slashing simulator

* add in necessary items for slasher sim

* sim item

* fix up

* fixed build

* rev

* slasher sim in testing

* testonly

* gaz

* gaz

* fix viz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
2021-09-29 02:27:21 +00:00

21 lines
433 B
Go

package slashings
import (
"testing"
"github.com/prysmaticlabs/prysm/testing/require"
)
var (
_ = PoolManager(&Pool{})
_ = PoolInserter(&Pool{})
_ = PoolManager(&PoolMock{})
_ = PoolInserter(&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)
}