forked from TrueCloudLab/neoneo-go
stateroot: fix missing verification script
Stateroot payload must have it.
This commit is contained in:
parent
5f7ec6e784
commit
5569512ce9
1 changed files with 6 additions and 1 deletions
|
@ -77,12 +77,17 @@ func (r *incompleteRoot) finalize(stateValidators keys.PublicKeys) (*state.MPTRo
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
verif, err := smartcontract.CreateDefaultMultiSigRedeemScript(stateValidators)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false
|
||||||
|
}
|
||||||
w := io.NewBufBinWriter()
|
w := io.NewBufBinWriter()
|
||||||
for i := range sigs {
|
for i := range sigs {
|
||||||
emit.Bytes(w.BinWriter, sigs[i])
|
emit.Bytes(w.BinWriter, sigs[i])
|
||||||
}
|
}
|
||||||
r.root.Witness = []transaction.Witness{{
|
r.root.Witness = []transaction.Witness{{
|
||||||
InvocationScript: w.Bytes(),
|
InvocationScript: w.Bytes(),
|
||||||
|
VerificationScript: verif,
|
||||||
}}
|
}}
|
||||||
return r.root, true
|
return r.root, true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue