minnor fixes

pull/4513/head
Diego Nava 1 year ago
parent 5e1f4820f3
commit 215bb10a29
No known key found for this signature in database
GPG Key ID: 61AFC8738DA8B8B1
  1. 8
      cmd/harmony/main.go
  2. 4
      core/preimages.go

@ -504,9 +504,11 @@ func setupNodeAndRun(hc harmonyconfig.HarmonyConfig) {
Msg("Start Rosetta failed")
}
go func() {
core.WritePreimagesMetricsIntoPrometheus(currentNode.Blockchain(), currentNode.Consensus.UpdatePreimageGenerationMetrics)
}()
go core.WritePreimagesMetricsIntoPrometheus(
currentNode.Blockchain(),
currentNode.Consensus.UpdatePreimageGenerationMetrics,
)
go listenOSSigAndShutDown(currentNode)
if !hc.General.IsOffline {

@ -328,11 +328,13 @@ func VerifyPreimages(header *block.Header, chain BlockChain) (uint64, error) {
key := accountIterator.LeafKey()
preimage := rawdb.ReadPreimage(diskDB, common.BytesToHash(key))
if len(preimage) == 0 {
return 0, errors.New(
err := errors.New(
fmt.Sprintf(
"cannot find preimage for %x after '%d' accounts", key, existingPreimages,
),
)
utils.Logger().Warn().Msg(err.Error())
return existingPreimages, err
}
address := common.BytesToAddress(preimage)
// skip blank address

Loading…
Cancel
Save