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") Msg("Start Rosetta failed")
} }
go func() { go core.WritePreimagesMetricsIntoPrometheus(
core.WritePreimagesMetricsIntoPrometheus(currentNode.Blockchain(), currentNode.Consensus.UpdatePreimageGenerationMetrics) currentNode.Blockchain(),
}() currentNode.Consensus.UpdatePreimageGenerationMetrics,
)
go listenOSSigAndShutDown(currentNode) go listenOSSigAndShutDown(currentNode)
if !hc.General.IsOffline { if !hc.General.IsOffline {

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

Loading…
Cancel
Save