routerrpc: TrackPayments (routerrpc)

https://github.com/lightningnetwork/lnd/pull/6335

Host: yyforyongyu  -  PR author: JssDWt

Notes

Questions

  • What suggestions do you have for first time contributors?
  • What’s the difference between SubscribePayment and SubscribeAllPayments?
  • What data structure is used to hold items in a ConcurrentQueue?
  • Will sending items to the queue (subscriber.queue.ChanIn() <- payment) ever be blocked?
  • What go type is used to hold the subscribers in controlTower and can we use a different one?
  • Do we have a limit on the number of max subscribers allowed?
  • When we subscribe the payments, we need to register the subscriber and fetch inflight payments. Does the order matter here? What did the author choose and what’s the tradeoff here?
  • Why is logging important?