Merge pull request #1317 from TheBlueMatt/2022-02-fix-bunk-test
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Sat, 5 Mar 2022 20:54:57 +0000 (20:54 +0000)
committerGitHub <noreply@github.com>
Sat, 5 Mar 2022 20:54:57 +0000 (20:54 +0000)
Fix what `bolt2_open_channel_sending_node_checks_part1` tests

.github/workflows/build.yml
CONTRIBUTING.md
lightning/src/ln/channelmanager.rs
lightning/src/routing/scoring.rs

index 964a752056d301ccc9c2275ebc5b5091d2d40cf5..bdcba81ddb0d8c98f684c78a47bf928806223563 100644 (file)
@@ -10,10 +10,8 @@ jobs:
         platform: [ ubuntu-latest ]
         toolchain: [ stable,
                      beta,
-                     # 1.36.0 is MSRV for Rust-Lightning, lightning-invoice, and lightning-persister
-                     1.36.0,
-                     # 1.41.0 is Debian stable
-                     1.41.0,
+                     # 1.41.1 is MSRV for Rust-Lightning, lightning-invoice, and lightning-persister
+                     1.41.1,
                      # 1.45.2 is MSRV for lightning-net-tokio, lightning-block-sync, and coverage generation
                      1.45.2,
                      # 1.47.0 will be the MSRV for no-std builds using hashbrown once core2 is updated
@@ -41,11 +39,9 @@ jobs:
           - toolchain: beta
             build-net-tokio: true
             build-no-std: true
-          - toolchain: 1.36.0
+          - toolchain: 1.41.1
             build-no-std: false
             test-log-variants: true
-          - toolchain: 1.41.0
-            build-no-std: false
           - toolchain: 1.45.2
             build-net-old-tokio: true
             build-net-tokio: true
@@ -56,7 +52,7 @@ jobs:
     runs-on: ${{ matrix.platform }}
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
       - name: Install Rust ${{ matrix.toolchain }} toolchain
         uses: actions-rs/toolchain@v1
         with:
@@ -202,7 +198,7 @@ jobs:
       TOOLCHAIN: nightly
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
       - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
         uses: actions-rs/toolchain@v1
         with:
@@ -241,7 +237,7 @@ jobs:
       TOOLCHAIN: 1.52.1
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
         with:
           fetch-depth: 0
       - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
@@ -266,7 +262,7 @@ jobs:
       TOOLCHAIN: stable
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
       - name: Install Rust 1.58 toolchain
         uses: actions-rs/toolchain@v1
         with:
@@ -290,7 +286,7 @@ jobs:
       TOOLCHAIN: 1.47.0
     steps:
       - name: Checkout source code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
       - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
         uses: actions-rs/toolchain@v1
         with:
index 2c1fb0d8a7376db6a0b7624fa8d0c0583423c64c..ab6ba2a410fb245c13fc1c7a6157a36448e9d07f 100644 (file)
@@ -75,7 +75,7 @@ be covered by functional tests.
 When refactoring, structure your PR to make it easy to review and don't
 hestitate to split it into multiple small, focused PRs.
 
-The Minimal Supported Rust Version is 1.36.0 (enforced by our GitHub Actions).
+The Minimum Supported Rust Version is 1.41.1 (enforced by our GitHub Actions).
 
 Commits should cover both the issue fixed and the solution's rationale.
 These [guidelines](https://chris.beams.io/posts/git-commit/) should be kept in mind.
index 674977faaebc2ecd519682ea8f5edb17589fc81b..d206dee4950f3f9908e0cbdd8af6755d485de2a2 100644 (file)
@@ -1322,6 +1322,7 @@ pub enum PaymentSendFailure {
 /// Route hints used in constructing invoices for [phantom node payents].
 ///
 /// [phantom node payments]: crate::chain::keysinterface::PhantomKeysManager
+#[derive(Clone)]
 pub struct PhantomRouteHints {
        /// The list of channels to be included in the invoice route hints.
        pub channels: Vec<ChannelDetails>,
index dfda3d2f867d189c7f36de9b45072c01bed98816..537d75012abc88b9233d403c03aac469b2cf77e4 100644 (file)
@@ -189,6 +189,7 @@ impl<'a, S: Writeable> Writeable for MutexGuard<'a, S> {
        }
 }
 
+#[derive(Clone)]
 /// [`Score`] implementation that uses a fixed penalty.
 pub struct FixedPenaltyScorer {
        penalty_msat: u64,
@@ -252,6 +253,7 @@ pub struct ScorerUsingTime<T: Time> {
        channel_failures: HashMap<u64, ChannelFailure<T>>,
 }
 
+#[derive(Clone)]
 /// Parameters for configuring [`Scorer`].
 pub struct ScoringParameters {
        /// A fixed penalty in msats to apply to each channel.