From 0a37ca0344fed55bf51321499bf285f2e586bad1 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 29 Jul 2019 23:39:29 +0200 Subject: [PATCH] Change op order License: MIT Signed-off-by: Jakub Sztandera --- chain/actors/actor_multisig.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/chain/actors/actor_multisig.go b/chain/actors/actor_multisig.go index b1809bd97..b3f09eed7 100644 --- a/chain/actors/actor_multisig.go +++ b/chain/actors/actor_multisig.go @@ -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")