-
Notifications
You must be signed in to change notification settings - Fork 336
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
Avoid using immature coinbase inputs #614
Avoid using immature coinbase inputs #614
Conversation
8520e53
to
36922b2
Compare
36922b2
to
68f7c81
Compare
68f7c81
to
59b0c52
Compare
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.
Concept ACK..
I have a comment on the selection logic..
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.
Pulled changes, tested and reviewed code. I found it hard to review the macro part because I'm not very comfortable with macros. Tested ACK
59b0c52
to
93ca3b9
Compare
Rebased, and also updated |
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.
Tested ACK 93ca3b9
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.
tACK 93ca3b9
1cc696e
to
ab2397a
Compare
Allows user to ask for a test db populated with clean coins from coinbases. This is useful for testing the wallet behaviour when some inputs are coinbases.
ab2397a
to
3406908
Compare
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.
ReACK 3406908
One non blocking note..
3406908
to
e85aa24
Compare
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 e85aa24
0f03831 Change get_balance to return in categories. (wszdexdrf) Pull request description: ### Description This changes `get_balance()` function so that it returns balance separated in 4 categories: - available - trusted-pending - untrusted-pending - immature Fixes #238 ### Notes to the reviewers Based on #614 ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [x] I've updated tests for the new feature * [x] I've added docs for the new feature * [x] I've updated `CHANGELOG.md` ACKs for top commit: afilini: ACK 0f03831 Tree-SHA512: 39f02c22c61b6c73dd8e6d27b1775a72e64ab773ee67c0ad00e817e555c52cdf648f482ca8be5fcc2f3d62134c35b720b1e61b311cb6debb3ad651e79c829b93
Description
With this PR we start considering how many confirmations a coinbase has. If it's not mature yet, we don't use it for building transactions.
Fixes #413
Notes to the reviewers
This PR is based on #611, review that one before reviewing this 😄
007c5a7 adds a coinbase parameter to
populate_test_db
, to specify if you want the db to be populated with immature coins. This is useful fortest_spend_coinbase
, but that's probably going to be the only use case.I don't think it's a big deal to have a test function take an almost_always_useless parameter - it's not an exposed API, anyways. But, if you can come up with a different way of implementing
test_spend_coinbase
that doesn't require 007c5a7, even better! I looked for it for a while, but other than duplicating the wholepopulate_test_db
code, which made the test way harder to comprehend, I didn't find any other way.Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingBugfixes: