Skip to content

Commit

Permalink
Minor fixes for inital validator set
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyilong committed Mar 21, 2023
1 parent 1f18aa4 commit 962b524
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ledger/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,11 @@ func (ledger *Ledger) getNewDynastyAndValidatorSet(view *slst.StoreView) (enteri
if witnessedDynasty.Cmp(registrationDynasty) == 0 {
// For the initial dynasty, i.e. the dynasty during which the subchain was registered, instead of querying
// the validator set from the main chain, we trust the validator set in the snapshot
return false, nil, nil
if currentDynasty.Cmp(common.Big0) == 0 { // the first validator set update
return true, witnessedDynasty, view.GetValidatorSet() // the validator set specified in the snapshot
} else {
return false, nil, nil
}
}

witnessedValidatorSet, err := ledger.metachainWitness.GetValidatorSetByDynasty(witnessedDynasty)
Expand Down

0 comments on commit 962b524

Please sign in to comment.