mirror of
https://github.com/btcsuite/btcd.git
synced 2026-08-17 13:06:26 +02:00
wire/msgtx: remove unused read/writeOutPoint
This commit is contained in:
parent
4cc4f76c55
commit
2e6eefcab1
2 changed files with 0 additions and 30 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue