Merge pull request #1185 from filecoin-project/fork/snowball

WIP, fork, fix slashing power calc
This commit is contained in:
Whyrusleeping
2020-01-30 21:31:37 -08:00
committed by GitHub
9 changed files with 201 additions and 12 deletions
+8
View File
@@ -388,6 +388,14 @@ func printTipSet(format string, ts *types.TipSet) {
blks += fmt.Sprintf("%s: %s,", b.Cid(), b.Miner)
}
blks += " ]"
sCids := make([]string, 0, len(blks))
for _, c := range ts.Cids() {
sCids = append(sCids, c.String())
}
format = strings.ReplaceAll(format, "<tipset>", strings.Join(sCids, ","))
format = strings.ReplaceAll(format, "<blocks>", blks)
format = strings.ReplaceAll(format, "<weight>", fmt.Sprint(ts.Blocks()[0].ParentWeight))