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

Chain mismatch for regtest #52

Merged
merged 1 commit into from
Jun 16, 2022
Merged

Conversation

crisdut
Copy link
Member

@crisdut crisdut commented Jun 15, 2022

I tried running the project in regtest mode, but the current check does not verify testnets correctly (occurs ChainMismatch).

I am a newbie in rust, but I started learning to contribute to LNPBP projects.

Can you recommend a better "idiomatic" implementation?

Thanks

@dr-orlovsky
Copy link
Contributor

I did not tried it with regtest, but used with testnet and signet. Can you give them a try?

@dr-orlovsky dr-orlovsky added the bug Something isn't working label Jun 15, 2022
@dr-orlovsky dr-orlovsky changed the title Fix funding wallet init check for testnets Chain mismatch for regtest Jun 15, 2022
@crisdut
Copy link
Member Author

crisdut commented Jun 15, 2022

Yes, I tried with signet but received the same error.

Steps to reproduce

  • Run lnpd init -vvvv and set a master key (ex:tprv8gUwd(...)8z)
  • The system return "Node initialization complete"
  • Run lnpd -vvvv the wallet check returns network equals testnet instead signet. (piece of code DescriptorExt::<bitcoin::PublicKey>::network )
  • The system return "ChainMismatch"

PS: I used rust_bitcoin project to generate signet master private key.

Copy link
Contributor

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on the solutuion!

Once small improvement in code style, since you asked about more idiomatic way. And can you please run rustup update nightly && cargo +nightly fmt, since here we use latest nighlty formatter and it does the job differenlty than a previous ones (leading to code formatting changes unrelated to this PR).

Also after that please squash everything into a single commit not to affect git blame status for the parts of code which are unrelated to the PR.

Sorry for a lot of details :(

src/lnpd/funding.rs Outdated Show resolved Hide resolved
@crisdut crisdut force-pushed the fix/regtest-support branch from 50b78bb to 11db1a7 Compare June 16, 2022 20:21
@crisdut crisdut requested a review from dr-orlovsky June 16, 2022 20:25
Copy link
Contributor

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 11db1a7

src/lnpd/funding.rs Show resolved Hide resolved
@dr-orlovsky dr-orlovsky merged commit a27e1a9 into LNP-WG:master Jun 16, 2022
@crisdut crisdut deleted the fix/regtest-support branch June 16, 2022 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants