@@ -403,37 +403,37 @@ func (g *LightningTerminal) ValidateMacaroon(ctx context.Context,
403403 // process. Calls that we proxy to a remote host don't need to be
404404 // checked as they'll have their own interceptor.
405405 switch {
406- case isLoopURI (fullMethod ):
406+ case isFaradayURI (fullMethod ):
407407 // In remote mode we just pass through the request, the remote
408408 // daemon will check the macaroon.
409- if g .cfg .loopRemote {
409+ if g .cfg .faradayRemote {
410410 return nil
411411 }
412412
413- if ! g .loopStarted {
414- return fmt .Errorf ("loop is not yet ready for " +
413+ if ! g .faradayStarted {
414+ return fmt .Errorf ("faraday is not yet ready for " +
415415 "requests, lnd possibly still starting or " +
416416 "syncing" )
417417 }
418418
419- return g .loopServer .ValidateMacaroon (
419+ return g .faradayServer .ValidateMacaroon (
420420 ctx , requiredPermissions , fullMethod ,
421421 )
422422
423- case isFaradayURI (fullMethod ):
423+ case isLoopURI (fullMethod ):
424424 // In remote mode we just pass through the request, the remote
425425 // daemon will check the macaroon.
426- if g .cfg .faradayRemote {
426+ if g .cfg .loopRemote {
427427 return nil
428428 }
429429
430- if ! g .faradayStarted {
431- return fmt .Errorf ("faraday is not yet ready for " +
430+ if ! g .loopStarted {
431+ return fmt .Errorf ("loop is not yet ready for " +
432432 "requests, lnd possibly still starting or " +
433433 "syncing" )
434434 }
435435
436- return g .faradayServer .ValidateMacaroon (
436+ return g .loopServer .ValidateMacaroon (
437437 ctx , requiredPermissions , fullMethod ,
438438 )
439439
@@ -554,8 +554,8 @@ func (g *LightningTerminal) shutdown() error {
554554// v non-registered call |
555555// +---+----------------------+ +---------v----------+
556556// | director | | local subserver |
557- // +---+----------------------+ | - loop |
558- // | | - faraday |
557+ // +---+----------------------+ | - faraday |
558+ // | | - loop |
559559// v authenticated call | - pool |
560560// +---+----------------------+ +--------------------+
561561// | lnd (remote or local) |
0 commit comments