mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 03:41:34 +00:00
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
0a2be89964
commit
0d17273476
2 changed files with 2 additions and 2 deletions
|
@ -193,7 +193,7 @@ func (t *Transaction) decodeBinaryNoSize(br *io.BinReader, buf []byte) {
|
|||
br.Err = errors.New("too many witnesses")
|
||||
return
|
||||
} 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), nscripts)
|
||||
return
|
||||
}
|
||||
t.Scripts = make([]Witness, nscripts)
|
||||
|
|
2
pkg/vm/testdata/neo-vm
vendored
2
pkg/vm/testdata/neo-vm
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 02f2c68e7ba2694aff88c143631e7acf158d378a
|
||||
Subproject commit 7e5996844a90b514739f879bc9f873f9a34c9a67
|
Loading…
Reference in a new issue