-
Notifications
You must be signed in to change notification settings - Fork 911
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
Track coinbases in wallet #5664
Conversation
cc267eb
to
a53ed79
Compare
tests/test_opening.py
Outdated
@@ -1898,3 +1898,22 @@ def test_zeroreserve_alldust(node_factory): | |||
# Now try with just a bit more | |||
l1.connect(l2) | |||
l1.rpc.fundchannel(l2.info['id'], minfunding + 1) | |||
|
|||
|
|||
@pytest.mark.xfail |
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.
This test is junk, it would fail even after you fix the problem!
The difference is that currently it fails with "Error broadcasting transaction: error code: -26\nerror message:\nbad-txns-premature-spend-of-coinbase, tried to spend coinbase at depth 1.", and you want a better error.
Don't change the test when you fix the problem! (Or maybe, just append to it!).
How about two inputs, one mature one not, and try to send 1000 sats and it should work? (We probably naively spend first input, so you should mine 100 blocks,then mine one to l1, then send another from bitcoind -> l1).
a53ed79
to
70d7cff
Compare
Attempt to spend a coinbase transaction, expected to fail.
beda83e
to
a29dcf4
Compare
Changelog-Changed: JSON-RPC: `listfunds` now lists coinbase outputs as 'immature' until they're spendable Changelog-Changed: JSON-RPC: UTXOs aren't spendable while immature
58a058e
to
f9280cc
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.
Mark outputs as coinbases; don't spend them until they're mature.
Fixes #5564
Fixes #5696