Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradStaniec committed Oct 16, 2024
1 parent 6932ea3 commit 60092a8
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions stakerdb/trackedtranactionstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,26 +640,13 @@ func outpointBytes(op *wire.OutPoint) ([]byte, error) {
return nil, err
}

binary.Write(&buf, binary.BigEndian, op.Index)
err = binary.Write(&buf, binary.BigEndian, op.Index)

return buf.Bytes(), nil
}

func outpointFromBytes(b []byte) (*wire.OutPoint, error) {
if len(b) != 36 {
return nil, fmt.Errorf("invalid outpoint bytes length")
}

hash, err := chainhash.NewHash(b[:32])
if err != nil {
return nil, err
}

return &wire.OutPoint{
Hash: *hash,
Index: binary.BigEndian.Uint32(b[32:]),
}, nil

return buf.Bytes(), nil
}

func getInputData(tx *wire.MsgTx) (*inputData, error) {
Expand Down

0 comments on commit 60092a8

Please sign in to comment.