-
Notifications
You must be signed in to change notification settings - Fork 349
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
exposing get_funded_wallet #411
exposing get_funded_wallet #411
Conversation
2c03c43
to
29f32d8
Compare
This looks good, my only concern is exposing test functions in the release builds for |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 29f32d8
Thanks for testing that stuff. |
Perhaps we should put this behind |
That looks like a good idea. I quickly tried it and executed a few commands that came to my mind. The only one that failed was: |
I think fuzzing is generally done by compiling to release mode with tests enabled. I don't think it's really a problem if it's available in release mode to be honest, I would just leave it in there |
75b1b75
to
29f32d8
Compare
@@ -1548,19 +1551,60 @@ where | |||
} | |||
} | |||
|
|||
/// Return a fake wallet that appears to be funded for testing. | |||
pub fn get_funded_wallet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try with #[cfg(test)]
to see if you could hide this to non-testing environments?
I didn't realize this yesterday, I thought this was still part of the test
module, which is only present when testing is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I add this, then I get the following error in bdk-reserves: "unresolved import bdk::wallet::get_funded_wallet
"
And if I try the following in bdk-reserves/Cargo.toml: "bdk = { ... features = ["electrum", "test"] }" then I get the following error: "the package bdk-reserves
depends on bdk
, with features: test
but bdk
does not have these features."
It would be cool to make it work like this, but I don't know how.
… for bdk-reserves
29f32d8
to
fa013ae
Compare
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md
Bugfixes: