lint issues

feature/dev-engine_test
Diego Nava 12 months ago
parent 652d2b7c9c
commit 5215f6d0d1
No known key found for this signature in database
GPG Key ID: 61AFC8738DA8B8B1
  1. 7
      internal/chain/reward.go
  2. 2
      test/chain/chain/chain_makers.go

@ -271,7 +271,7 @@ func AccumulateRewardsAndCountSigs(
// Handle rewards on pre-aggregated rewards era.
if !bc.Config().IsAggregatedRewardEpoch(header.Epoch()) {
reader, err := distributeRewardBeforeAggregateEpoch(bc, state, header, beaconChain, defaultReward, sigsReady)
return numeric.ZeroDec(), reader, err;
return numeric.ZeroDec(), reader, err
}
// Aggregated Rewards Era: Rewards are aggregated every 64 blocks.
@ -286,7 +286,6 @@ func AccumulateRewardsAndCountSigs(
return numeric.ZeroDec(), network.EmptyPayout, nil
}
_, reader, err := distributeRewardAfterAggregateEpoch(bc, state, header, beaconChain, defaultReward)
return numeric.ZeroDec(), reader, err
}
@ -422,12 +421,12 @@ func distributeRewardAfterAggregateEpoch(bc engine.ChainReader, state *state.DB,
return numeric.ZeroDec(), network.EmptyPayout, err
}
}
utils.Logger().Debug().Int64("elapsed time", time.Since(startTimeLocal).Milliseconds()).Msg("After Chain Reward (AddReward)")
utils.Logger().Debug().Int64("elapsed time", time.Since(startTime).Milliseconds()).Msg("After Chain Reward")
// remainingReward needs to be multipled with the number of crosslinks across all shards
return remainingReward.MulInt(big.NewInt(int64(len(allCrossLinks)))), network.NewStakingEraRewardForRound(
newRewards, payouts,
), nil

@ -185,7 +185,7 @@ func GenerateChain(
if b.engine != nil {
// Finalize and seal the block
block, _, err := b.engine.Finalize(
block, _, _, err := b.engine.Finalize(
chainreader, nil, b.header, statedb, b.txs, b.receipts, nil, nil, nil, nil, nil, func() uint64 { return 0 },
)
if err != nil {

Loading…
Cancel
Save