From ad1b5d535530ce82ada8ccd703e551c169eb5508 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 5 Sep 2024 13:50:12 +0200 Subject: [PATCH] rfqmsg: remove unused functions --- rfqmsg/records.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/rfqmsg/records.go b/rfqmsg/records.go index 96aaa5f42..9f5cb6945 100644 --- a/rfqmsg/records.go +++ b/rfqmsg/records.go @@ -2,7 +2,6 @@ package rfqmsg import ( "bytes" - "crypto/sha256" "errors" "fmt" "io" @@ -391,33 +390,3 @@ func IdDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error { return tlv.NewTypeForDecodingErr(val, "MessageID", l, idBytesLen) } - -func AssetIdEncoder(w io.Writer, val any, buf *[8]byte) error { - if t, ok := val.(**asset.ID); ok { - id := [sha256.Size]byte(**t) - return tlv.EBytes32(w, &id, buf) - } - - return tlv.NewTypeForEncodingErr(val, "assetId") -} - -func AssetIdDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error { - const assetIDBytesLen = sha256.Size - - if typ, ok := val.(**asset.ID); ok { - var idBytes [assetIDBytesLen]byte - - err := tlv.DBytes32(r, &idBytes, buf, assetIDBytesLen) - if err != nil { - return err - } - - id := asset.ID(idBytes) - assetId := &id - - *typ = assetId - return nil - } - - return tlv.NewTypeForDecodingErr(val, "assetId", l, sha256.Size) -}