smartcontract: add CreateDefaultMultiSigRedeemScript
And use it where appropriate. Some of our code was just plain wrong (like the one in GAS contract) and unification is always useful here.
This commit is contained in:
parent
80302c5c07
commit
dba248236c
6 changed files with 62 additions and 15 deletions
|
@ -118,11 +118,7 @@ func committeeFromConfig(cfg config.ProtocolConfiguration) ([]*keys.PublicKey, e
|
|||
}
|
||||
|
||||
func getNextConsensusAddress(validators []*keys.PublicKey) (val util.Uint160, err error) {
|
||||
vlen := len(validators)
|
||||
raw, err := smartcontract.CreateMultiSigRedeemScript(
|
||||
vlen-(vlen-1)/3,
|
||||
validators,
|
||||
)
|
||||
raw, err := smartcontract.CreateDefaultMultiSigRedeemScript(validators)
|
||||
if err != nil {
|
||||
return val, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue