Commit 070e9d76 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update api

parent f3508f06
...@@ -71,7 +71,7 @@ func (v *Validator) GetMerkleProof(address common.Address, date string) (balance ...@@ -71,7 +71,7 @@ func (v *Validator) GetMerkleProof(address common.Address, date string) (balance
return "0", make([]common.Hash, 0) return "0", make([]common.Hash, 0)
} }
if len(proofs) == 0 { if len(proofs) == 0 {
return "0", nil return "0", make([]common.Hash, 0)
} }
return object.Balance, proofs return object.Balance, proofs
...@@ -150,8 +150,8 @@ func (v *Validator) GetWorkload(timestampList []uint64) (ret []map[string]string ...@@ -150,8 +150,8 @@ func (v *Validator) GetWorkload(timestampList []uint64) (ret []map[string]string
ret = append(ret, map[string]string{ ret = append(ret, map[string]string{
"date": v.timestampToDate(int64(timestamp)), "date": v.timestampToDate(int64(timestamp)),
"weiPerWorkload": wei.String(), "weiPerWorkload": wei.String(),
"reward": w.String(), "reward": r.String(),
"workload": r.String(), "workload": w.String(),
}) })
} }
return ret, nil return ret, nil
......
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