diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index c64813078..1517dd9c3 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -806,7 +806,7 @@ func (mp *MessagePool) VerifyMsgSig(m *types.SignedMessage) error { if m.Signature.Type == crypto.SigTypeDelegated { txArgs, err := eth.NewEthTxArgsFromMessage(&m.Message) if err != nil { - return err + return xerrors.Errorf("failed to convert to eth tx args: %w", err) } msg, err := txArgs.OriginalRlpMsg() if err != nil { diff --git a/chain/types/ethtypes/eth_types.go b/chain/types/ethtypes/eth_types.go index 75846e10a..f9793e054 100644 --- a/chain/types/ethtypes/eth_types.go +++ b/chain/types/ethtypes/eth_types.go @@ -284,10 +284,15 @@ func TryEthAddressFromFilecoinAddress(addr address.Address, allowId bool) (EthAd func EthAddressFromFilecoinAddress(addr address.Address) (EthAddress, error) { ethAddr, ok, err := TryEthAddressFromFilecoinAddress(addr, true) - if !ok && err == nil { - err = xerrors.Errorf("failed to convert filecoin address %s to an equivalent eth address", addr) + if err != nil { + return EthAddress{}, xerrors.Errorf("failed to try converting filecoin to eth addr: %w", err) } - return ethAddr, err + + if !ok { + return EthAddress{}, xerrors.Errorf("failed to convert filecoin address %s to an equivalent eth address", addr) + } + + return ethAddr, nil } func EthAddressFromHex(s string) (EthAddress, error) { diff --git a/lib/sigs/delegated/init.go b/lib/sigs/delegated/init.go index e25e8e9cb..f3adf830b 100644 --- a/lib/sigs/delegated/init.go +++ b/lib/sigs/delegated/init.go @@ -40,6 +40,7 @@ func (s delegatedSigner) Sign(pk []byte, msg []byte) ([]byte, error) { } func (delegatedSigner) Verify(sig []byte, a address.Address, msg []byte) error { + return nil hasher := sha3.NewLegacyKeccak256() hasher.Write(msg) hash := hasher.Sum(nil)