diff --git a/wire/bench_test.go b/wire/bench_test.go index a5a71625..43f6159b 100644 --- a/wire/bench_test.go +++ b/wire/bench_test.go @@ -571,17 +571,6 @@ func BenchmarkReadTxInBuf(b *testing.B) { func BenchmarkWriteTxIn(b *testing.B) { b.ReportAllocs() - txIn := blockOne.Transactions[0].TxIn[0] - for i := 0; i < b.N; i++ { - writeTxIn(ioutil.Discard, 0, 0, txIn) - } -} - -// BenchmarkWriteTxInBuf performs a benchmark on how long it takes to write -// a transaction input. -func BenchmarkWriteTxInBuf(b *testing.B) { - b.ReportAllocs() - buf := binarySerializer.Borrow() txIn := blockOne.Transactions[0].TxIn[0] for i := 0; i < b.N; i++ { diff --git a/wire/msgtx.go b/wire/msgtx.go index 954691c0..e8f97fbb 100644 --- a/wire/msgtx.go +++ b/wire/msgtx.go @@ -1127,15 +1127,6 @@ func readTxInBuf(r io.Reader, pver uint32, version int32, ti *TxIn, return nil } -// writeTxIn encodes ti to the bitcoin protocol encoding for a transaction -// input (TxIn) to w. -func writeTxIn(w io.Writer, pver uint32, version int32, ti *TxIn) error { - buf := binarySerializer.Borrow() - err := writeTxInBuf(w, pver, version, ti, buf) - binarySerializer.Return(buf) - return err -} - // writeTxInBuf encodes ti to the bitcoin protocol encoding for a transaction // input (TxIn) to w. If b is non-nil, the provided buffer will be used for // serializing small values. Otherwise a buffer will be drawn from the