diff options
Diffstat (limited to 'hotline/transaction.go')
| -rw-r--r-- | hotline/transaction.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/hotline/transaction.go b/hotline/transaction.go index 4637463..037e939 100644 --- a/hotline/transaction.go +++ b/hotline/transaction.go @@ -6,7 +6,6 @@ import ( "encoding/binary" "errors" "fmt" - "io" "math/rand" "slices" ) @@ -253,14 +252,7 @@ func (t *Transaction) Read(p []byte) (int, error) { bbuf.Bytes(), ) - if t.readOffset >= len(buf) { - return 0, io.EOF // All bytes have been read - } - - n := copy(p, buf[t.readOffset:]) - t.readOffset += n - - return n, nil + return readFrom(p, &t.readOffset, buf) } // Size returns the total size of the transaction payload |