looks like it's working

This commit is contained in:
Sami Mäkelä 2020-08-18 13:33:11 +03:00
parent 88fbc044b3
commit 4ae02ef1b9

View File

@ -294,6 +294,8 @@ func createAccount(ctx context.Context, bs bstore.Blockstore, cst cbor.IpldStore
return xerrors.Errorf("failed to create empty map: %v", err) return xerrors.Errorf("failed to create empty map: %v", err)
} }
var signers []address.Address
for _, e := range ainfo.Signers { for _, e := range ainfo.Signers {
idAddress, _ := keyIDs[e] idAddress, _ := keyIDs[e]
st, err := cst.Put(ctx, &account.State{Address: e}) st, err := cst.Put(ctx, &account.State{Address: e})
@ -308,10 +310,11 @@ func createAccount(ctx context.Context, bs bstore.Blockstore, cst cbor.IpldStore
if err != nil { if err != nil {
return xerrors.Errorf("setting account from actmap: %w", err) return xerrors.Errorf("setting account from actmap: %w", err)
} }
signers = append(signers, idAddress)
} }
st, err := cst.Put(ctx, &multisig.State{ st, err := cst.Put(ctx, &multisig.State{
Signers: ainfo.Signers, Signers: signers,
NumApprovalsThreshold: uint64(ainfo.Threshold), NumApprovalsThreshold: uint64(ainfo.Threshold),
StartEpoch: abi.ChainEpoch(ainfo.VestingStart), StartEpoch: abi.ChainEpoch(ainfo.VestingStart),
UnlockDuration: abi.ChainEpoch(ainfo.VestingDuration), UnlockDuration: abi.ChainEpoch(ainfo.VestingDuration),