diff --git a/tlv/record.go b/tlv/record.go index 923d70fa..cad51379 100644 --- a/tlv/record.go +++ b/tlv/record.go @@ -1,6 +1,7 @@ package tlv import ( + "fmt" "io" "github.com/btcsuite/btcd/btcec" @@ -126,7 +127,7 @@ func MakePrimitiveRecord(typ Type, val interface{}) Record { decoder = DVarBytes default: - panic("unknown primitive type") + panic(fmt.Sprintf("unknown primitive type: %T", val)) } return Record{