func commitmentToBalances(h *seqhash.Hash, c comp.C) int { trackc := verified.NewTrackC(c) t := h.Finish(trackc).(verified.LogTree) trackc.Use(t) lastReturn := t.Index(t.Count()-1, trackc) trackc.Use(lastReturn) _ = lastReturn.ArgsOrResults[0].(bitrie.Bitrie) return computeSize(h, trackc) }
func randomBalance(balances bitrie.Bitrie, c comp.C) int { key := core.RandomKey(bitrie.Bits{}, balances, c) trackc := verified.NewTrackC(c) info, found := balances.Get(key, trackc) if !found { panic(key) } oi := info.(*core.OutpointInfo) trackc.Use(oi) return computeSize(balances, trackc) }
func nextstep(h *seqhash.Hash, c comp.C) int { trackc := verified.NewTrackC(c) _, _ = verified.Resolve(h.Finish(trackc).(verified.LogTree), trackc) return computeSize(h, trackc) }