Change func name and nil pointer check based on comments

This commit is contained in:
Shrenuj Bansal
2022-08-17 10:47:05 -04:00
parent 32a2ae12cb
commit 60751f809b
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -85,11 +85,14 @@ type UuidWrapper struct {
}
func (a *UuidWrapper) MpoolPushMessage(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error) {
if spec == nil {
spec = new(api.MessageSendSpec)
}
spec.MsgUuid = uuid.New()
return a.FullNode.MpoolPushMessage(ctx, msg, spec)
}
func GetUuidWrapper(a v1api.RawFullNodeAPI) v1api.FullNode {
func MakeUuidWrapper(a v1api.RawFullNodeAPI) v1api.FullNode {
return &UuidWrapper{a}
}