-
Notifications
You must be signed in to change notification settings - Fork 411
rustfmt
: Run on offers
#3577
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
rustfmt
: Run on offers
#3577
Conversation
After the conflicts are resolved here, I don't have a strong opinion on how it's formatted things, so LGTM. |
16a7ba1
to
ce2a568
Compare
Resolved conflicts. |
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.
There's about two pending PRs touching this module that should land today or early next week, then lets land this.
lightning/src/offers/merkle.rs
Outdated
() => { | ||
"02080000010000020003" | ||
}; | ||
} | ||
macro_rules! tlv3 { () => { "03310266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c0351800000000000000010000000000000002" } } |
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.
Why didn't this get 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.
Because rustfmt at times avoids touching macros. Not sure if a bug or a feature.
Now made it a constant anyways.
Needs rebase, not sure if there's any remaining PRs touching this code? I don't think so. |
ce2a568
to
3297ddb
Compare
Rebased and addressed comments. |
3297ddb
to
f38c88f
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.
Gonna land this to get it out of the way.
@@ -793,13 +813,14 @@ macro_rules! invoice_request_verify_method { ($self: ident, $self_type: ty) => { | |||
}) | |||
} | |||
|
|||
/// Verifies that the request was for an offer created using the given key by checking a nonce | |||
/// Verifies that the request was for an offer created using the given key by checking a nonce |
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.
wat
/// Verifies that the request was for an offer created using the given key by checking the | ||
macro_rules! invoice_request_verify_method { | ||
($self: ident, $self_type: ty) => { | ||
/// Verifies that the request was for an offer created using the given key by checking the |
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.
wat
@@ -333,11 +336,19 @@ mod tests { | |||
let payment_id = PaymentId([1; 32]); | |||
|
|||
let recipient_pubkey = { | |||
let secret_key = SecretKey::from_slice(&<Vec<u8>>::from_hex("4141414141414141414141414141414141414141414141414141414141414141").unwrap()).unwrap(); | |||
let secret_bytes = <Vec<u8>>::from_hex( |
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.
Same with all these, please don't let a simple from_hex turn into 4 LoC.
We run the formatter on the
offers
sub-directory.