Skip to content

Commit 3bd1090

Browse files
committed
asset: improve code formatting
1 parent bab8f11 commit 3bd1090

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

asset/encoding.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,16 @@ func CompressedPubKeyEncoder(w io.Writer, val any, buf *[8]byte) error {
140140
return tlv.NewTypeForEncodingErr(val, "*btcec.PublicKey")
141141
}
142142

143-
func CompressedPubKeyDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error {
143+
func CompressedPubKeyDecoder(r io.Reader, val any, buf *[8]byte,
144+
l uint64) error {
145+
144146
if typ, ok := val.(**btcec.PublicKey); ok {
145147
var keyBytes [btcec.PubKeyBytesLenCompressed]byte
146148
err := tlv.DBytes33(r, &keyBytes, buf, btcec.PubKeyBytesLenCompressed)
147149
if err != nil {
148150
return err
149151
}
152+
150153
var key *btcec.PublicKey
151154
// Handle empty key, which is not on the curve.
152155
if keyBytes == [btcec.PubKeyBytesLenCompressed]byte{} {
@@ -160,6 +163,7 @@ func CompressedPubKeyDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error
160163
*typ = key
161164
return nil
162165
}
166+
163167
return tlv.NewTypeForDecodingErr(
164168
val, "*btcec.PublicKey", l, btcec.PubKeyBytesLenCompressed,
165169
)

0 commit comments

Comments
 (0)