Change op order

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera 2019-07-29 23:39:29 +02:00
parent f7a8d11f14
commit 0a37ca0344

View File

@ -174,14 +174,18 @@ func (msa MultiSigActor) Propose(act *types.Actor, vmctx types.VMContext,
txid := self.NextTxID
self.NextTxID++
tx := MTransaction{
TxID: txid,
To: params.To,
Value: params.Value,
Method: params.Method,
Params: params.Params,
Approved: []address.Address{vmctx.Message().From},
{
tx := MTransaction{
TxID: txid,
To: params.To,
Value: params.Value,
Method: params.Method,
Params: params.Params,
Approved: []address.Address{vmctx.Message().From},
}
self.Transactions = append(self.Transactions, tx)
}
tx := self.getTransaction(txid)
if self.Required == 1 {
_, err := vmctx.Send(tx.To, tx.Method, tx.Value, tx.Params)
@ -192,8 +196,6 @@ func (msa MultiSigActor) Propose(act *types.Actor, vmctx types.VMContext,
tx.Complete = true
}
self.Transactions = append(self.Transactions, tx)
err = msa.save(vmctx, head, self)
if err != nil {
return nil, aerrors.Wrap(err, "saving state")