Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare networks for LND autowithdrawals #1028

Open
ekzyis opened this issue Apr 5, 2024 · 0 comments
Open

Compare networks for LND autowithdrawals #1028

ekzyis opened this issue Apr 5, 2024 · 0 comments
Labels
difficulty:good-first-issue enhancement improvements to existing features

Comments

@ekzyis
Copy link
Member

ekzyis commented Apr 5, 2024

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

@ekzyis ekzyis added the enhancement improvements to existing features label Apr 5, 2024
@ekzyis ekzyis changed the title Network not checked for LND autowithdrawals Compare networks for LND autowithdrawals Apr 5, 2024
@ekzyis ekzyis self-assigned this Apr 6, 2024
@ekzyis ekzyis removed their assignment May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:good-first-issue enhancement improvements to existing features
Projects
None yet
Development

No branches or pull requests

2 participants