This commit is contained in:
alex.sharov 2021-08-28 16:54:23 +07:00
parent 62390de485
commit e866d47c1b

View File

@ -104,7 +104,7 @@ func ParseGetPooledTransactions66(payload []byte, pos int, hashbuf []byte) (requ
}
hashes = ensureEnoughSize(hashbuf, 32*hashesCount)
for i := 0; pos != len(payload); i++ {
for i := 0; pos < len(payload); i++ {
pos, err = rlp.ParseHash(payload, pos, hashes[i*32:])
if err != nil {
return 0, hashes, 0, err
@ -126,7 +126,7 @@ func ParseGetPooledTransactions65(payload []byte, pos int, hashbuf []byte) (hash
}
hashes = ensureEnoughSize(hashbuf, 32*hashesCount)
for i := 0; pos != len(payload); i++ {
for i := 0; pos < len(payload); i++ {
pos, err = rlp.ParseHash(payload, pos, hashes[i*32:])
if err != nil {
return hashes, 0, err