Continue if msg not found on-chain

Continue if msg not found on-chain
This commit is contained in:
Phi 2023-08-22 10:56:50 +02:00
parent e1ed24ddd0
commit 825064669d

View File

@ -59,9 +59,8 @@ var msgCmd = &cli.Command{
return err
}
if lookup == nil {
return fmt.Errorf("failed to find message: %s", mcid)
}
fmt.Println("Message not found on-chain. Continuing...")
} else {
// Replay the message to get the execution trace
res, err := api.StateReplay(ctx, types.EmptyTSK, mcid)
if err != nil {
@ -77,11 +76,13 @@ var msgCmd = &cli.Command{
}
fmt.Println(string(trace))
fmt.Println()
}
color.Green("Receipt:")
fmt.Printf("Exit code: %d\n", res.MsgRct.ExitCode)
fmt.Printf("Return: %x\n", res.MsgRct.Return)
fmt.Printf("Gas Used: %d\n", res.MsgRct.GasUsed)
}
}
switch msg := msg.(type) {
case *types.SignedMessage: