Make array prealloc correct size

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

View File

@ -335,7 +335,7 @@ func (msa MultiSigActor) SwapSigner(act *types.Actor, vmctx types.VMContext,
return nil, aerrors.New(6, "given new address was already a signer") return nil, aerrors.New(6, "given new address was already a signer")
} }
newSigners := make([]address.Address, 0, len(self.Signers)-1) newSigners := make([]address.Address, 0, len(self.Signers))
for _, s := range self.Signers { for _, s := range self.Signers {
if s != params.From { if s != params.From {
newSigners = append(newSigners, s) newSigners = append(newSigners, s)