Skip to content
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

trivial clippy warning fixes #740

Merged

Conversation

rloomba
Copy link
Contributor

@rloomba rloomba commented Oct 8, 2020

Trvial changes to fix two one clippy warning : clippy::inconsistent_digit_grouping and clippy::write_with_newline warnings.

@@ -41,7 +41,7 @@ use util::ser::{Readable, Writeable, Writer, FixedLengthReader, HighZeroBytesDro
use ln::channelmanager::{PaymentPreimage, PaymentHash, PaymentSecret};

/// 21 million * 10^8 * 1000
pub(crate) const MAX_VALUE_MSAT: u64 = 21_000_000_0000_0000_000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is very specifically written this way because the number is 21 million * 10^8, and thus grouping the 8 into 2*4 is more readable. Same with the other SATS numbers.

@rloomba rloomba force-pushed the rloomba/trivial-clippy-fixes branch from 490c211 to c8e49aa Compare October 8, 2020 23:06
@codecov
Copy link

codecov bot commented Oct 8, 2020

Codecov Report

Merging #740 into main will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #740      +/-   ##
==========================================
- Coverage   91.99%   91.95%   -0.04%     
==========================================
  Files          37       37              
  Lines       20108    20108              
==========================================
- Hits        18498    18490       -8     
- Misses       1610     1618       +8     
Impacted Files Coverage Δ
lightning/src/routing/network_graph.rs 94.22% <ø> (ø)
lightning/src/util/macro_logger.rs 89.79% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 96.93% <0.00%> (-0.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52121ea...c8e49aa. Read the comment docs.

@TheBlueMatt TheBlueMatt merged commit 04dbf1f into lightningdevkit:main Oct 9, 2020
naumenkogs pushed a commit to naumenkogs/rust-lightning that referenced this pull request Oct 21, 2020
When we receive an inbound HTLC from a peer on an inbound channel,
make sure the funder can still cover the additional on-chain cost
of the HTLC while maintaining their channel reserve.

When we're sending an outbound HTLC, make sure the funder can still
cover the additional on-chain cost of the HTLC while maintaining
their channel reserve.

+ implement fee spike buffer for channel initiators sending payments.
Also add an additional spec-deviating fee spike buffer on the
receiving side (but don't close the channel if this reserve is
violated, just fail the HTLC).
From lightning-rfc PR lightningdevkit#740.

Co-authored-by: Matt Corallo <git@bluematt.me>
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
tnull pushed a commit to tnull/rust-lightning that referenced this pull request Dec 5, 2020
When we receive an inbound HTLC from a peer on an inbound channel,
make sure the funder can still cover the additional on-chain cost
of the HTLC while maintaining their channel reserve.

When we're sending an outbound HTLC, make sure the funder can still
cover the additional on-chain cost of the HTLC while maintaining
their channel reserve.

+ implement fee spike buffer for channel initiators sending payments.
Also add an additional spec-deviating fee spike buffer on the
receiving side (but don't close the channel if this reserve is
violated, just fail the HTLC).
From lightning-rfc PR lightningdevkit#740.

Co-authored-by: Matt Corallo <git@bluematt.me>
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
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.

2 participants