forked from TrueCloudLab/neoneo-go
core: fix formatted error on transaction verification
Witnesses are not yet created by the moment we return this error, thus, it was always 0 as an actual number of witnesses in ErrInvalidWitnessNum. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
edd4f390ad
commit
cf4001d31c
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ func (t *Transaction) decodeBinaryNoSize(br *io.BinReader, buf []byte) {
|
||||||
br.Err = errors.New("too many witnesses")
|
br.Err = errors.New("too many witnesses")
|
||||||
return
|
return
|
||||||
} else if int(nscripts) != len(t.Signers) {
|
} else if int(nscripts) != len(t.Signers) {
|
||||||
br.Err = fmt.Errorf("%w: %d vs %d", ErrInvalidWitnessNum, len(t.Signers), len(t.Scripts))
|
br.Err = fmt.Errorf("%w: %d vs %d", ErrInvalidWitnessNum, len(t.Signers), int(nscripts))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t.Scripts = make([]Witness, nscripts)
|
t.Scripts = make([]Witness, nscripts)
|
||||||
|
|
Loading…
Add table
Reference in a new issue