Skip to content

Commit ad1b5d5

Browse files
guggeroffranr
authored andcommitted
rfqmsg: remove unused functions
1 parent a492f25 commit ad1b5d5

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

rfqmsg/records.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package rfqmsg
22

33
import (
44
"bytes"
5-
"crypto/sha256"
65
"errors"
76
"fmt"
87
"io"
@@ -391,33 +390,3 @@ func IdDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error {
391390

392391
return tlv.NewTypeForDecodingErr(val, "MessageID", l, idBytesLen)
393392
}
394-
395-
func AssetIdEncoder(w io.Writer, val any, buf *[8]byte) error {
396-
if t, ok := val.(**asset.ID); ok {
397-
id := [sha256.Size]byte(**t)
398-
return tlv.EBytes32(w, &id, buf)
399-
}
400-
401-
return tlv.NewTypeForEncodingErr(val, "assetId")
402-
}
403-
404-
func AssetIdDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error {
405-
const assetIDBytesLen = sha256.Size
406-
407-
if typ, ok := val.(**asset.ID); ok {
408-
var idBytes [assetIDBytesLen]byte
409-
410-
err := tlv.DBytes32(r, &idBytes, buf, assetIDBytesLen)
411-
if err != nil {
412-
return err
413-
}
414-
415-
id := asset.ID(idBytes)
416-
assetId := &id
417-
418-
*typ = assetId
419-
return nil
420-
}
421-
422-
return tlv.NewTypeForDecodingErr(val, "assetId", l, sha256.Size)
423-
}

0 commit comments

Comments
 (0)