mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
8143cc36bc
* Start adding "inject slashing into pool" * Attempt at slashing * Remove unneded * Fix * Begin adding slasher client to e2e * Start slasher in e2e * Get slashing detection working * Get slashing evaluators working * Progress on e2e * Cleanup e2e * Fix slasher e2e! * lint * Comment * Fixes * Improve accuracy of balance check * REmove extra * Remove extra * Make more accurate
32 lines
902 B
Go
32 lines
902 B
Go
package endtoend
|
|
|
|
import (
|
|
"testing"
|
|
|
|
ev "github.com/prysmaticlabs/prysm/endtoend/evaluators"
|
|
"github.com/prysmaticlabs/prysm/shared/featureconfig"
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil"
|
|
)
|
|
|
|
func TestEndToEnd_Slashing_MinimalConfig(t *testing.T) {
|
|
testutil.ResetCache()
|
|
params.UseMinimalConfig()
|
|
|
|
minimalConfig := &end2EndConfig{
|
|
beaconFlags: append(featureconfig.E2EBeaconChainFlags, "--minimal-config", "--custom-genesis-delay=15"),
|
|
validatorFlags: append(featureconfig.E2EValidatorFlags, "--minimal-config"),
|
|
epochsToRun: 2,
|
|
numBeaconNodes: 2,
|
|
numValidators: params.BeaconConfig().MinGenesisActiveValidatorCount,
|
|
testSync: false,
|
|
evaluators: []ev.Evaluator{
|
|
ev.PeersConnect,
|
|
ev.ValidatorsSlashed,
|
|
ev.SlashedValidatorsLoseBalance,
|
|
ev.InjectDoubleVote,
|
|
},
|
|
}
|
|
runEndToEndTest(t, minimalConfig)
|
|
}
|