Avoid using immature coinbase inputs#614
Merged
afilini merged 2 commits intobitcoindevkit:masterfrom Jul 5, 2022
Merged
Conversation
8520e53 to
36922b2
Compare
36922b2 to
68f7c81
Compare
68f7c81 to
59b0c52
Compare
Contributor
rajarshimaitra
left a comment
There was a problem hiding this comment.
Concept ACK..
I have a comment on the selection logic..
3 tasks
Contributor
vladimirfomene
left a comment
There was a problem hiding this comment.
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
Member
Author
|
Rebased, and also updated |
wszdexdrf
approved these changes
Jun 14, 2022
14 tasks
afilini
reviewed
Jun 28, 2022
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
evanlinjin
reviewed
Jun 30, 2022
evanlinjin
reviewed
Jun 30, 2022
rajarshimaitra
approved these changes
Jul 1, 2022
Contributor
rajarshimaitra
left a comment
There was a problem hiding this comment.
ReACK 3406908
One non blocking note..
3406908 to
e85aa24
Compare
24 tasks
afilini
approved these changes
Jul 5, 2022
afilini
added a commit
that referenced
this pull request
Aug 4, 2022
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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_coinbasethat doesn't require 007c5a7, even better! I looked for it for a while, but other than duplicating the wholepopulate_test_dbcode, which made the test way harder to comprehend, I didn't find any other way.Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes: