mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-23 14:40:44 +01:00
wire/msgtx: remove unused writeTxIn
This commit is contained in:
parent
da89ed68ff
commit
f0184e58ba
2 changed files with 0 additions and 20 deletions
|
@ -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++ {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue