wire/msgtx: remove unused writeTxIn

This commit is contained in:
Conner Fromknecht 2020-01-24 19:45:28 -08:00 committed by Olaoluwa Osuntokun
parent da89ed68ff
commit f0184e58ba
No known key found for this signature in database
GPG key ID: 3BBD59E99B280306
2 changed files with 0 additions and 20 deletions

View file

@ -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++ {

View file

@ -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