tests: read validator state from runtime context

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-19 00:34:00 -07:00
co-authored by Hanzo Dev
parent cf0561e110
commit 8eb03e773e
+3 -3
View File
@@ -7,8 +7,8 @@ import (
"context"
"testing"
"github.com/luxfi/consensus"
"github.com/luxfi/ids"
"github.com/luxfi/runtime"
"github.com/stretchr/testify/require"
)
@@ -16,8 +16,8 @@ func TestNewTestConsensusContext(t *testing.T) {
// Test that NewTestConsensusContext creates a context with validator state
consensusCtx := NewTestConsensusContext(t)
// Extract validator state through the EVM consensus helper.
validatorState := consensus.GetValidator(consensusCtx)
// Extract validator state through the runtime context used in production.
validatorState := runtime.GetValidatorState(consensusCtx)
require.NotNil(t, validatorState)
// Test that we can call GetValidatorSet without panicking