aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/transaction.go')
-rw-r--r--hotline/transaction.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/hotline/transaction.go b/hotline/transaction.go
index e7bfa58..9eb8794 100644
--- a/hotline/transaction.go
+++ b/hotline/transaction.go
@@ -6,7 +6,6 @@ import (
"fmt"
"github.com/jhalter/mobius/concat"
"math/rand"
- "net"
)
const (
@@ -131,29 +130,6 @@ func ReadTransaction(buf []byte) (*Transaction, int, error) {
}, tranLen, nil
}
-func readN(conn net.Conn, n int) ([]Transaction, error) {
- buf := make([]byte, 1400)
- i := 0
- for {
- readLen, err := conn.Read(buf)
- if err != nil {
- return nil, err
- }
-
- transactions, _, err := readTransactions(buf[:readLen])
- // spew.Fdump(os.Stderr, transactions)
- if err != nil {
- return nil, err
- }
-
- i += len(transactions)
-
- if n == i {
- return transactions, nil
- }
- }
-}
-
func readTransactions(buf []byte) ([]Transaction, int, error) {
var transactions []Transaction