sn_lnd: Fix wallet.db + add new pk and addr to .env.dev #2185
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Close #2183
PR #2179 replaces
lnd/sn/wallet.db
, which means:This PR adds an address ("account"?) to sn_lnd wallet via:
lncli newaddress p2wkh
. This allows the node to scan the chain for that address on startup. (Previously there were no address generated so it did not search for any)After that action,
wallet.db
is exported from the docker volume to replace the existing blob in the repo.That generated address (
bcrt1qu...sjw
) is also added to .env. This allows theminecron
script to send coins to the node on regtest init.The new wallet.db introduced in #2179 also changed the node's pubkey, so that .env is also updated accodingly to what shows up for sn_lnd's
lncli getinfo .identity_pubkey
Now, when starting a fresh environment, sn_lnd will be able to recieve coins and open channels, allowing sn_lnd to accept lightning payments.
Screenshots
Additional Context
After generating the address,
lncli wallet addresses list
prints:(before running this command it prints empty list
[]
)Was anything unclear during your work on this PR? Anything we should definitely take a closer look at?
I'm far from an LND expert here, but this is what worked after a lot of compariosn against the
lnd
container which did work properly on startup.Checklist
Are your changes backwards compatible? Please answer below:
N/A?
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
8
This creates a side effect change around an eclair channels edge case thing I'm going to file today.
For frontend changes: Tested on mobile, light and dark mode? Please answer below:
Did you introduce any new environment variables? If so, call them out explicitly here:
No but I updated the values of
SN_LND_PUBKEY
,SN_LND_ADDR