-
Notifications
You must be signed in to change notification settings - Fork 411
Expand documentation and fields in SpendableOutputDescriptors #786
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
Expand documentation and fields in SpendableOutputDescriptors #786
Conversation
0fabfbc
to
9d566cc
Compare
Codecov Report
@@ Coverage Diff @@
## main #786 +/- ##
==========================================
- Coverage 90.84% 90.79% -0.05%
==========================================
Files 44 44
Lines 24073 24084 +11
==========================================
- Hits 21868 21866 -2
- Misses 2205 2218 +13
Continue to review full report at Codecov.
|
@@ -7484,7 +7486,7 @@ fn test_data_loss_protect() { | |||
let header = BlockHeader { version: 0x20000000, prev_blockhash: Default::default(), merkle_root: Default::default(), time: 42, bits: 42, nonce: 42}; | |||
connect_block(&nodes[0], &Block { header, txdata: vec![node_txn[0].clone()]}, 0); | |||
connect_blocks(&nodes[0], ANTI_REORG_DELAY - 1, 0, true, header.block_hash()); | |||
let spend_txn = check_spendable_outputs!(nodes[0], 1, node_cfgs[0].keys_manager, 100000); | |||
let spend_txn = check_spendable_outputs!(nodes[0], 1, node_cfgs[0].keys_manager, 1000000); |
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.
And we don't have introduced failures ? Is this change relevant ?
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.
The value checks just check that fee is >= 0, so passing in a low value here just resulted in the fee/weight calculation checks always passing.
9d566cc
to
aa5768b
Compare
How do we expect the user to use |
Its required to reconstruct the |
Ah, yes, of course. |
aa5768b
to
b4d790c
Compare
@devrandom took your suggestion from #789 (comment). Also included a bindings update commit, cause its not hard and its nice to land at the same time. |
b4d790c
to
00b80e9
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 (except for bindings, which I'm not very familiar with, yet)
00b80e9
to
28027a3
Compare
Instead of `key_derivation_params` being a rather strange type, we call it `channel_keys_id` and give it a generic 32 byte array. This should be much clearer for users and also more flexible.
This adds a channel_value_satoshis field to SpendableOutputDescriptors as it is required to recreate our InMemoryChannelKeys. It also slightly expands documentation.
Specifically, this notes when methods can or can not return the same value on each call.
28027a3
to
06342a3
Compare
Rebased, only changes were to re-run the auto-bindings-generation. |
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.
LGTM 💯 nice docs improvements
0x01, 0x40, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x20, 0x20, 0x12, 0x70, 0x44, | ||
0x41, 0x40, 0xaf, 0xc5, 0x72, 0x97, 0xc8, 0x69, 0xba, 0x04, 0xdb, 0x28, 0x7b, 0xd7, 0x32, 0x07, | ||
0x33, 0x3a, 0x4a, 0xc2, 0xc5, 0x56, 0x06, 0x05, 0x65, 0xd7, 0xa8, 0xcf, 0x01, 0x00, 0x00, 0x00, | ||
0x01, 0x40, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x20, 0xd1, 0xd9, 0x13, 0xa9, |
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.
Oops post-merge review but, I don't get why this PR's changes would result in a different channel-opening tx being necessary in the demo?
This is pretty trivial, but not having channel_value_satoshis in the output descriptors really sucks.