diff --git a/chain/store/store.go b/chain/store/store.go index aaf6cf44d..e0cd0e91a 100644 --- a/chain/store/store.go +++ b/chain/store/store.go @@ -5,11 +5,12 @@ import ( "context" "encoding/binary" "encoding/json" - "github.com/filecoin-project/lotus/lib/adtutil" "io" "os" "sync" + "github.com/filecoin-project/lotus/lib/adtutil" + "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/minio/blake2b-simd" @@ -659,7 +660,7 @@ func (cs *ChainStore) GetCMessage(c cid.Cid) (types.ChainMsg, error) { return m, nil } if err != bstore.ErrNotFound { - log.Warn("GetCMessage: unexpected error getting unsigned message: %s", err) + log.Warnf("GetCMessage: unexpected error getting unsigned message: %s", err) } return cs.GetSignedMessage(c) diff --git a/cli/multisig.go b/cli/multisig.go index 5412f4819..ef38c8168 100644 --- a/cli/multisig.go +++ b/cli/multisig.go @@ -364,12 +364,17 @@ var msigProposeCmd = &cli.Command{ return fmt.Errorf("proposal returned exit %d", wait.Receipt.ExitCode) } - _, v, err := cbg.CborReadHeader(bytes.NewReader(wait.Receipt.Return)) - if err != nil { - return err + var retval samsig.ProposeReturn + if err := retval.UnmarshalCBOR(bytes.NewReader(wait.Receipt.Return)); err != nil { + return fmt.Errorf("failed to unmarshal propose return value: %w", err) } - fmt.Printf("Transaction ID: %d\n", v) + fmt.Printf("Transaction ID: %d\n", retval.TxnID) + if retval.Applied { + fmt.Printf("Transaction was executed during propose\n") + fmt.Printf("Exit Code: %d\n", retval.Code) + fmt.Printf("Return Value: %x\n", retval.Ret) + } return nil }, diff --git a/node/impl/full/multisig.go b/node/impl/full/multisig.go index 2ae28f6a0..6e0025a83 100644 --- a/node/impl/full/multisig.go +++ b/node/impl/full/multisig.go @@ -2,6 +2,7 @@ package full import ( "context" + "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/go-address" @@ -115,7 +116,7 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr Params: params, }) if actErr != nil { - return cid.Undef, actErr + return cid.Undef, xerrors.Errorf("failed to serialize parameters: %w", actErr) } msg := &types.Message{ @@ -130,7 +131,7 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg) if err != nil { - return cid.Undef, nil + return cid.Undef, xerrors.Errorf("failed to push message: %w", err) } return smsg.Cid(), nil