From 98c888a630c8ab1367ad0f2b1ac852cf4c1a2340 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Sun, 17 Nov 2019 11:00:45 -0600 Subject: [PATCH] address feedback --- api/permissioned.go | 4 ++-- chain/types/signature.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/permissioned.go b/api/permissioned.go index eee6d330d..58d027278 100644 --- a/api/permissioned.go +++ b/api/permissioned.go @@ -65,7 +65,7 @@ func permissionedAny(in interface{}, out interface{}) { field := rint.Type().Field(f) requiredPerm := Permission(field.Tag.Get("perm")) if requiredPerm == "" { - panic("missing 'perm' tag on " + field.Name) // is this okay? can this be used to crash the process? + panic("missing 'perm' tag on " + field.Name) // ok } // Validate perm tag @@ -77,7 +77,7 @@ func permissionedAny(in interface{}, out interface{}) { } } if !ok { - panic("unknown 'perm' tag on " + field.Name) // is this okay? can this be used to crash the process? + panic("unknown 'perm' tag on " + field.Name) // ok } fn := ra.MethodByName(field.Name) diff --git a/chain/types/signature.go b/chain/types/signature.go index f3a61327b..8d7182e12 100644 --- a/chain/types/signature.go +++ b/chain/types/signature.go @@ -56,6 +56,7 @@ func (s *Signature) TypeCode() int { case KTBLS: return IKTBLS default: + log.Errorf("called TypeCode on signature with unknown Type: %q", s.Type) return IKTUnknown } }