forked from TrueCloudLab/frostfs-node
[#1959] neofs-adm: Fix double multisig
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
2484c1d35e
commit
942155be6e
2 changed files with 10 additions and 4 deletions
|
@ -395,6 +395,7 @@ func (c *initializeContext) sendMultiTx(script []byte, tryGroup bool, withConsen
|
||||||
var act *actor.Actor
|
var act *actor.Actor
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
withConsensus = withConsensus && !c.ConsensusAcc.Contract.ScriptHash().Equals(c.CommitteeAcc.ScriptHash())
|
||||||
if tryGroup {
|
if tryGroup {
|
||||||
// Even for consensus signatures we need the committee to pay.
|
// Even for consensus signatures we need the committee to pay.
|
||||||
signers := make([]actor.SignerAccount, 1, 2)
|
signers := make([]actor.SignerAccount, 1, 2)
|
||||||
|
|
|
@ -131,13 +131,18 @@ func (c *initializeContext) multiSign(tx *transaction.Transaction, accType strin
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(tx.Scripts) == 0 {
|
if len(tx.Scripts) == 0 {
|
||||||
tx.Scripts = append(tx.Scripts, *w)
|
tx.Scripts = make([]transaction.Witness, len(tx.Signers))
|
||||||
} else {
|
|
||||||
tx.Scripts[0] = *w
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for i := range tx.Signers {
|
||||||
|
if tx.Signers[i].Account == h {
|
||||||
|
tx.Scripts[i] = *w
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%s account was not found among transaction signers", accType)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *initializeContext) transferGASToProxy() error {
|
func (c *initializeContext) transferGASToProxy() error {
|
||||||
gasHash := c.nativeHash(nativenames.Gas)
|
gasHash := c.nativeHash(nativenames.Gas)
|
||||||
|
|
Loading…
Reference in a new issue