diff --git a/client/consensus/grandpa/authorities_test.go b/client/consensus/grandpa/authorities_test.go index d209805ec4..6312f2b2a5 100644 --- a/client/consensus/grandpa/authorities_test.go +++ b/client/consensus/grandpa/authorities_test.go @@ -175,11 +175,11 @@ func TestChangesIteratedInPreOrder(t *testing.T) { func TestApplyChange(t *testing.T) { authorities := AuthoritySet[string, uint]{ - currentAuthorities: []Authority{}, - setID: 0, - pendingStandardChanges: NewChangeTree[string, uint](), - pendingForcedChanges: []PendingChange[string, uint]{}, - authoritySetChanges: AuthoritySetChanges[uint]{}, + CurrentAuthorities: []Authority{}, + SetID: 0, + PendingStandardChanges: NewChangeTree[string, uint](), + PendingForcedChanges: []PendingChange[string, uint]{}, + AuthoritySetChanges: AuthoritySetChanges[uint]{}, } var setA []Authority diff --git a/client/consensus/grandpa/aux_schema.go b/client/consensus/grandpa/aux_schema.go index cc840e7031..5e0671cd98 100644 --- a/client/consensus/grandpa/aux_schema.go +++ b/client/consensus/grandpa/aux_schema.go @@ -90,7 +90,10 @@ func loadPersistent[H comparable, N constraints.Unsigned](store AuxStore, genesi }, nil } else { logger.Info("👴 Loading GRANDPA authority set from genesis on what appears to be first startup") - genesisSet := NewGenesisAuthoritySet[H, N](genesisAuthorities) + genesisSet, err := NewGenesisAuthoritySet[H, N](genesisAuthorities) + if err != nil { + return nil, err + } state := finalityGrandpa.NewRoundState(finalityGrandpa.HashNumber[H, N]{Hash: genesisHash, Number: genesisNumber}) base := state.PrevoteGHOST diff --git a/client/consensus/grandpa/aux_schema_test.go b/client/consensus/grandpa/aux_schema_test.go index 2dfee25355..f799b355b0 100644 --- a/client/consensus/grandpa/aux_schema_test.go +++ b/client/consensus/grandpa/aux_schema_test.go @@ -95,7 +95,8 @@ func TestLoadPersistentGenesis(t *testing.T) { require.NoError(t, err) require.NotNil(t, persistentData) - genesisSet := NewGenesisAuthoritySet[string, uint](genesisAuthorities) + genesisSet, err := NewGenesisAuthoritySet[string, uint](genesisAuthorities) + require.NoError(t, err) state := finalityGrandpa.NewRoundState(finalityGrandpa.HashNumber[string, uint]{Hash: genesisHash, Number: genesisNumber}) base := state.PrevoteGHOST @@ -132,7 +133,8 @@ func TestLoadPersistentNotGenesis(t *testing.T) { }} // Auth set and Set state both written - genesisSet := NewGenesisAuthoritySet[string, uint](genesisAuthorities) + genesisSet, err := NewGenesisAuthoritySet[string, uint](genesisAuthorities) + require.NoError(t, err) state := finalityGrandpa.NewRoundState(finalityGrandpa.HashNumber[string, uint]{Hash: genesisHash, Number: genesisNumber}) base := state.PrevoteGHOST