[offchain] Forgot removal of ! which did not write the reward-per-key to work (#2681)

pull/2685/head
Edgar Aroutiounian 5 years ago committed by GitHub
parent 45135b21d6
commit 9718e16820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      core/offchain.go

@ -230,15 +230,19 @@ func (bc *BlockChain) CommitOffChainData(
)
}
}
if !doUpdate {
if err := rawdb.WriteValidatorStats(batch, paid[i].Addr, stats); err != nil {
utils.Logger().Info().
Err(err).Msg("could not update earning per key in stats")
if doUpdate {
if err := rawdb.WriteValidatorStats(
batch, paid[i].Addr, stats,
); err != nil {
utils.Logger().Info().Err(err).
Str("bls-earning-key", paid[i].EarningKey.Hex()).
Msg("could not update earning per key in stats")
}
}
} else {
utils.Logger().Info().
Err(err).Msg("could not read validator stats to update for earning per key")
utils.Logger().Info().Err(err).
Str("bls-earning-key", paid[i].EarningKey.Hex()).
Msg("could not read validator stats to update for earning per key")
}
}
}

Loading…
Cancel
Save