Commit 1c20f1db authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

debug log

parent 27984b44
......@@ -38,7 +38,8 @@ func (s *StateDB) GetMinerObject(miner common.Address) (object *validatorv1.Mine
k := crypto.Keccak256(miner.Bytes())
v, err := s.trie.Get(k)
if err != nil {
return nil
log.WithError(err).Warn("trie get miner object failed")
return object
}
log.Debugf("GetMinerObject %s %s\n", miner.Hex(), common.Bytes2Hex(v))
if v == nil {
......
......@@ -241,6 +241,7 @@ func (v *Validator) Commit() (dayProofs map[common.Address]*validatorv1.Validate
}).Info("get workload threshold from contract")
for miner, proof := range proof {
log.WithField("miner", miner.Hex()).Debug("before seal proof")
balance := big.NewInt(0).Mul(balancePerWorkload, big.NewInt(int64(proof.Workload)))
proof.Balance = balance.String()
err := v.SealProof(miner, proof)
......@@ -292,6 +293,7 @@ func (v *Validator) RefreshPendingProof() (proof map[common.Address]*validatorv1
continue
}
for miner, pendingProof := range pendingProofMap {
log.WithField("miner", miner.Hex()).Debug("refresh pending proof")
proof[miner] = pendingProof
totalWorkload += pendingProof.Workload
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment