Change func name and nil pointer check based on comments
This commit is contained in:
parent
32a2ae12cb
commit
60751f809b
@ -78,7 +78,7 @@ func ConfigStorageMiner(c interface{}) Option {
|
||||
|
||||
return Options(
|
||||
|
||||
Override(new(v1api.FullNode), modules.GetUuidWrapper),
|
||||
Override(new(v1api.FullNode), modules.MakeUuidWrapper),
|
||||
// Needed to instantiate pubsub used by index provider via ConfigCommon
|
||||
Override(new(dtypes.DrandSchedule), modules.BuiltinDrandConfig),
|
||||
Override(new(dtypes.BootstrapPeers), modules.BuiltinBootstrap),
|
||||
|
@ -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}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user