wire/msgtx: remove unused read/writeOutPoint

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

View file

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

View file

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