Merge pull request #2282 from filecoin-project/fix/msig-create-no-addrs

error out when trying to create multisig with no addresses
This commit is contained in:
Łukasz Magiera 2020-07-06 18:44:22 +02:00 committed by GitHub
commit 41d3ac2159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,10 @@ var msigCreateCmd = &cli.Command{
defer closer() defer closer()
ctx := ReqContext(cctx) ctx := ReqContext(cctx)
if cctx.Args().Len() < 1 {
return fmt.Errorf("multisigs must have at least one signer")
}
var addrs []address.Address var addrs []address.Address
for _, a := range cctx.Args().Slice() { for _, a := range cctx.Args().Slice() {
addr, err := address.NewFromString(a) addr, err := address.NewFromString(a)