Skip to content

Conversation

@tnull
Copy link
Contributor

@tnull tnull commented Jan 30, 2025

We run the formatter on the offers sub-directory.

@dunxen
Copy link
Contributor

dunxen commented Feb 6, 2025

After the conflicts are resolved here, I don't have a strong opinion on how it's formatted things, so LGTM.

@tnull tnull force-pushed the 2025-01-rustfmt-offers branch from 16a7ba1 to ce2a568 Compare February 6, 2025 15:28
@tnull
Copy link
Contributor Author

tnull commented Feb 6, 2025

After the conflicts are resolved here, I don't have a strong opinion on how it's formatted things, so LGTM.

Resolved conflicts.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a 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.

"02080000010000020003"
};
}
macro_rules! tlv3 { () => { "03310266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c0351800000000000000010000000000000002" } }
Copy link
Collaborator

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?

Copy link
Contributor Author

@tnull tnull Feb 10, 2025

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.

@TheBlueMatt
Copy link
Collaborator

Needs rebase, not sure if there's any remaining PRs touching this code? I don't think so.

@tnull tnull force-pushed the 2025-01-rustfmt-offers branch from ce2a568 to 3297ddb Compare February 10, 2025 10:25
@tnull
Copy link
Contributor Author

tnull commented Feb 10, 2025

Needs rebase, not sure if there's any remaining PRs touching this code? I don't think so.

Rebased and addressed comments.

@tnull tnull force-pushed the 2025-01-rustfmt-offers branch from 3297ddb to f38c88f Compare February 10, 2025 10:27
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a 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.

}

/// 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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wat


let recipient_pubkey = {
let secret_key = SecretKey::from_slice(&<Vec<u8>>::from_hex("4141414141414141414141414141414141414141414141414141414141414141").unwrap()).unwrap();
let secret_bytes = <Vec<u8>>::from_hex(
Copy link
Collaborator

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.

@TheBlueMatt TheBlueMatt merged commit 1b281f1 into lightningdevkit:main Feb 10, 2025
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants