diff --git a/txpool/packets.go b/txpool/packets.go index f540af384..ca7b9b66b 100644 --- a/txpool/packets.go +++ b/txpool/packets.go @@ -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