You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
While working on #994, I noticed that I could connect a mainnet node even though the SN node on my local machine was running on regtest. This would obviously fail on payments.
I tried to fix it in #994 by comparing the networks of both nodes but did not find a solution that I was satisfied with. I also didn't want to hardcode networks for dev and prod using NODE_ENV since I like to also test production mode locally sometimes.
Describe the solution you'd like
Make sure that connected node is on same network as SN node. Ideally, don't depend on environment variables but actually compare the networks of both nodes.
Describe alternatives you've considered
A simple check that checks that the BOLT11 invoice prefix is lnbc for production and lnbcrt for development (note the overlapping prefixes during implementation).
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
While working on #994, I noticed that I could connect a mainnet node even though the SN node on my local machine was running on regtest. This would obviously fail on payments.
I tried to fix it in #994 by comparing the networks of both nodes but did not find a solution that I was satisfied with. I also didn't want to hardcode networks for dev and prod using
NODE_ENV
since I like to also test production mode locally sometimes.Describe the solution you'd like
Make sure that connected node is on same network as SN node. Ideally, don't depend on environment variables but actually compare the networks of both nodes.
Describe alternatives you've considered
A simple check that checks that the BOLT11 invoice prefix is
lnbc
for production andlnbcrt
for development (note the overlapping prefixes during implementation).Additional context
n/a
The text was updated successfully, but these errors were encountered: