Skip to content

Commit b5e0442

Browse files
committed
fix: use correct varint decoding for Handshake
* move varint decode/encode from messages to common place * add additional block tests * use custom varint decode in block/transaction decode Fixes #438 Signed-off-by: Aurora Gaffney <[email protected]>
1 parent c383bee commit b5e0442

File tree

5 files changed

+293
-235
lines changed

5 files changed

+293
-235
lines changed

internal/handshake/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (b *Block) Decode(r *bytes.Buffer) error {
4545
return err
4646
}
4747
// Transactions
48-
txCount, err := binary.ReadUvarint(r)
48+
txCount, err := ReadUvarintReader(r)
4949
if err != nil {
5050
return err
5151
}

0 commit comments

Comments
 (0)