Don't set fields if UnlockDuration is 0
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
737f056c12
commit
92b145ec4d
@ -119,10 +119,12 @@ func (MultiSigActor) MultiSigConstructor(act *types.Actor, vmctx types.VMContext
|
|||||||
self := &MultiSigActorState{
|
self := &MultiSigActorState{
|
||||||
Signers: params.Signers,
|
Signers: params.Signers,
|
||||||
Required: params.Required,
|
Required: params.Required,
|
||||||
|
}
|
||||||
|
|
||||||
InitialBalance: vmctx.Message().Value,
|
if params.UnlockDuration != 0 {
|
||||||
UnlockDuration: params.UnlockDuration,
|
self.InitialBalance = vmctx.Message().Value
|
||||||
StartingBlock: vmctx.BlockHeight(),
|
self.UnlockDuration = params.UnlockDuration
|
||||||
|
self.StartingBlock = vmctx.BlockHeight()
|
||||||
}
|
}
|
||||||
|
|
||||||
head, err := vmctx.Storage().Put(self)
|
head, err := vmctx.Storage().Put(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user