Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: axieinfinity/ronin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9371dbb6c22599f5b629c543507ee5a8bc354b07
Choose a base ref
..
head repository: axieinfinity/ronin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dea136304ff21e6c4578bb25f686e4305a20c408
Choose a head ref
Showing with 4 additions and 13 deletions.
  1. +4 −13 consensus/consortium/v1/consortium.go
17 changes: 4 additions & 13 deletions consensus/consortium/v1/consortium.go
Original file line number Diff line number Diff line change
@@ -338,9 +338,7 @@ func (c *Consortium) snapshot(chain consensus.ChainHeaderReader, number uint64,
if cpHeader != nil {
hash := cpHeader.Hash()

var validators []common.Address
var err error
validators, err = c.getValidatorsFromGenesis()
validators, err := c.getValidatorsFromGenesis()
if err != nil {
return nil, err
}
@@ -487,16 +485,9 @@ func (c *Consortium) Prepare(chain consensus.ChainHeaderReader, header *types.He

if number%c.config.Epoch == 0 {
var validators []common.Address
if c.skipCheckpointHeaderCheck {
validators, err = c.getValidatorsFromGenesis()
if err != nil {
return err
}
} else {
validators, err = c.getValidatorsFromContract(chain, number-1)
if err != nil {
return err
}
validators, err := c.getValidatorsFromGenesis()
if err != nil {
return err
}

for _, signer := range validators {