Skip to content

Generating new adress with empty descriptor gives 0 exit code #170

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

Open
torkelrogstad opened this issue Aug 14, 2024 · 4 comments
Open

Generating new adress with empty descriptor gives 0 exit code #170

torkelrogstad opened this issue Aug 14, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@torkelrogstad
Copy link

Describe the bug
Calling get_new_address with an empty descriptor prints an error, but exits with 0.

To Reproduce

$ bdk-cli --network signet wallet --descriptor "" get_new_address
$ echo $?
0

Expected behavior
I'd expect a non-0 exit code.

Build environment

  • BDK-CLI tag/commit: 0.27.1
  • OS+version: macOS
  • Rust/Cargo version: cargo 1.74.1 (ecb9851af 2023-10-18)
@torkelrogstad torkelrogstad added the bug Something isn't working label Aug 14, 2024
@va-an va-an mentioned this issue Jan 21, 2025
@tvpeter
Copy link
Contributor

tvpeter commented Apr 15, 2025

The v1 update returns an error:

ERROR bdk_cli] Generic error: Miniscript error: unexpected «(0 args) while parsing Miniscript»

Please confirm that the issue is resolved and close it.

@va-an
Copy link

va-an commented Apr 17, 2025

@tvpeter

I've got the same error message for 0.27.1:

-> % cargo install bdk-cli --features electrum
    Updating crates.io index
  Installing bdk-cli v0.27.1
...
    Finished `release` profile [optimized] target(s) in 18.99s
  Installing /Users/vaan/.cargo/bin/bdk-cli
   Installed package `bdk-cli v0.27.1` (executable `bdk-cli`)
-> % bdk-cli --network signet wallet --descriptor "" get_new_address
[2025-04-17T10:23:37Z ERROR bdk_cli] Descriptor error: Miniscript error: unexpected «(0 args) while parsing Miniscript»
vaan@mbpro [14:23:37] [~]
-> % echo $?
0

The the issue is still here - return code is zero despite error message.

My PR #173 with a fix points to master, but if I execute the same command in the current master branch, there will be a different error. It seems that master is quite different from the current actual release 0.27.1.

Should I direct my fix to the release/0.27.1 branch instead of master?

@tvpeter
Copy link
Contributor

tvpeter commented Apr 17, 2025

Hi @va-an , thanks for reproducing the error.

My PR #173 with a fix points to master, but if I execute the same command in the current master branch, there will be a different error

Yes, it produces a different error message

It seems that master is quite different from the current actual release 0.27.1.

Yes, the current master state has not been released yet.

Should I direct my fix to the release/0.27.1 branch instead of master?

Your fix should point to master as it is now.

Please rebase with the lastest master so that your PR will be reviewed. It currently has conflicts.

Thank you

@va-an
Copy link

va-an commented Apr 18, 2025

@tvpeter, thanks for clarifying this for me!
I reset my branch to origin/master and manually transferred the changes with force push to simplify the history.

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

No branches or pull requests

3 participants