-
Notifications
You must be signed in to change notification settings - Fork 15
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
Clean code, better documentation and comments #439
base: dev
Are you sure you want to change the base?
Conversation
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.
Thanks a lot for undertaking this large task, I have some comments that might be helpful going forward.
I will merge this PR as it is now, and distribute the remaining tasks accordingly. |
/// ≤ (`# of blocks mined after UTXO appears on the chain`). However, this is not mandatory. | ||
/// One can spend an output delayed for some number of blocks just by using the nSequence field | ||
/// of the input inside the transaction. For more, see: | ||
/// https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki and |
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.
Could be bullet list
pub fn generate_relative_timelock_script( | ||
actor_taproot_xonly_pk: XOnlyPublicKey, // This is the tweaked XonlyPublicKey, which appears in the script_pubkey of the address | ||
block_count: i64, | ||
actor_taproot_xonly_pk: XOnlyPublicKey, // This is the tweaked XonlyPublicKey, which appears in the script_pubkey of the address. The tweaked signature will be given accordingly. |
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.
i think this should be in the function comment so that everyone can see this comment without locating the code
0, | ||
Some(bitcoin::sighash::TapSighashType::SinglePlusAnyoneCanPay) | ||
)?; | ||
|
||
// Creates the start_happy_reimburse_tx handler. |
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.
a bit verbose imo
Description
This PR introduces better documentation and code comments. Also cleans the code.
Linked Issues
#410
#431
Testing
None
Docs
This whole PR is about the docs.