Invoker: Use MethodMeta from go-state-types
This commit is contained in:
+2
-2
@@ -494,8 +494,8 @@ var ChainInspectUsage = &cli.Command{
|
||||
|
||||
mm := filcns.NewActorRegistry().Methods[code][m.Message.Method] // TODO: use remote map
|
||||
|
||||
byMethod[mm.Num] += m.Message.GasLimit
|
||||
byMethodC[mm.Num]++
|
||||
byMethod[mm.Name] += m.Message.GasLimit
|
||||
byMethodC[mm.Name]++
|
||||
}
|
||||
|
||||
type keyGasPair struct {
|
||||
|
||||
+1
-2
@@ -327,8 +327,7 @@ func TestInspectUsage(t *testing.T) {
|
||||
// check for gas by sender
|
||||
assert.Contains(t, out, "By Sender")
|
||||
// check for gas by method
|
||||
methodStr := fmt.Sprintf("By Method:\n%d", builtin.MethodSend)
|
||||
assert.Contains(t, out, methodStr)
|
||||
assert.Contains(t, out, "By Method:\nSend")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -341,7 +341,7 @@ var msigInspectCmd = &cli.Command{
|
||||
paramStr = string(b)
|
||||
}
|
||||
|
||||
fmt.Fprintf(w, "%d\t%s\t%d\t%s\t%s\t%s(%d)\t%s\n", txid, "pending", len(tx.Approved), target, types.FIL(tx.Value), method.Num, tx.Method, paramStr)
|
||||
fmt.Fprintf(w, "%d\t%s\t%d\t%s\t%s\t%s(%d)\t%s\n", txid, "pending", len(tx.Approved), target, types.FIL(tx.Value), method.Name, tx.Method, paramStr)
|
||||
}
|
||||
}
|
||||
if err := w.Flush(); err != nil {
|
||||
|
||||
+1
-1
@@ -1384,7 +1384,7 @@ func codeStr(c cid.Cid) string {
|
||||
}
|
||||
|
||||
func getMethod(code cid.Cid, method abi.MethodNum) string {
|
||||
return filcns.NewActorRegistry().Methods[code][method].Num // todo: use remote
|
||||
return filcns.NewActorRegistry().Methods[code][method].Name // todo: use remote
|
||||
}
|
||||
|
||||
func toFil(f types.BigInt) types.FIL {
|
||||
|
||||
Reference in New Issue
Block a user