consensus: restrict invocation script size
This commit is contained in:
parent
02d0874200
commit
dac94a692d
1 changed files with 3 additions and 3 deletions
|
@ -96,7 +96,7 @@ func (p *changeViewCompact) DecodeBinary(r *io.BinReader) {
|
|||
p.ValidatorIndex = r.ReadU16LE()
|
||||
p.OriginalViewNumber = r.ReadB()
|
||||
p.Timestamp = r.ReadU32LE()
|
||||
p.InvocationScript = r.ReadVarBytes()
|
||||
p.InvocationScript = r.ReadVarBytes(1024)
|
||||
}
|
||||
|
||||
// EncodeBinary implements io.Serializable interface.
|
||||
|
@ -112,7 +112,7 @@ func (p *commitCompact) DecodeBinary(r *io.BinReader) {
|
|||
p.ViewNumber = r.ReadB()
|
||||
p.ValidatorIndex = r.ReadU16LE()
|
||||
r.ReadBytes(p.Signature[:])
|
||||
p.InvocationScript = r.ReadVarBytes()
|
||||
p.InvocationScript = r.ReadVarBytes(1024)
|
||||
}
|
||||
|
||||
// EncodeBinary implements io.Serializable interface.
|
||||
|
@ -126,7 +126,7 @@ func (p *commitCompact) EncodeBinary(w *io.BinWriter) {
|
|||
// DecodeBinary implements io.Serializable interface.
|
||||
func (p *preparationCompact) DecodeBinary(r *io.BinReader) {
|
||||
p.ValidatorIndex = r.ReadU16LE()
|
||||
p.InvocationScript = r.ReadVarBytes()
|
||||
p.InvocationScript = r.ReadVarBytes(1024)
|
||||
}
|
||||
|
||||
// EncodeBinary implements io.Serializable interface.
|
||||
|
|
Loading…
Reference in a new issue