From 2e6eefcab1771a8fa6dbf2b7ec05de29a4e25190 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 24 Jan 2020 19:45:50 -0800 Subject: [PATCH] wire/msgtx: remove unused read/writeOutPoint --- wire/bench_test.go | 20 -------------------- wire/msgtx.go | 10 ---------- 2 files changed, 30 deletions(-) diff --git a/wire/bench_test.go b/wire/bench_test.go index f02038b3..0455052b 100644 --- a/wire/bench_test.go +++ b/wire/bench_test.go @@ -365,26 +365,6 @@ func BenchmarkWriteVarStrBuf10(b *testing.B) { func BenchmarkReadOutPoint(b *testing.B) { b.ReportAllocs() - buf := []byte{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Previous output hash - 0xff, 0xff, 0xff, 0xff, // Previous output index - } - r := bytes.NewReader(buf) - var op OutPoint - for i := 0; i < b.N; i++ { - r.Seek(0, 0) - readOutPoint(r, 0, 0, &op) - } -} - -// BenchmarkReadOutPointBuf performs a benchmark on how long it takes to read a -// transaction output point. -func BenchmarkReadOutPointBuf(b *testing.B) { - b.ReportAllocs() - buffer := binarySerializer.Borrow() buf := []byte{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/wire/msgtx.go b/wire/msgtx.go index 0b961ab9..dd699f96 100644 --- a/wire/msgtx.go +++ b/wire/msgtx.go @@ -969,16 +969,6 @@ func NewMsgTx(version int32) *MsgTx { } } -// readOutPoint reads the next sequence of bytes from r as an OutPoint. -// -// DEPRECATED: Use readOutPointBuf instead. -func readOutPoint(r io.Reader, pver uint32, version int32, op *OutPoint) error { - buf := binarySerializer.Borrow() - err := readOutPointBuf(r, pver, version, op, buf) - binarySerializer.Return(buf) - return err -} - // readOutPointBuf reads the next sequence of bytes from r as an OutPoint. // // If b is non-nil, the provided buffer will be used for serializing small