Merge pull request #956 from jkczyz/2021-06-validate-pub
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Fri, 18 Jun 2021 18:06:45 +0000 (18:06 +0000)
committerGitHub <noreply@github.com>
Fri, 18 Jun 2021 18:06:45 +0000 (18:06 +0000)
Increase poll::Validate visibility to pub

.github/workflows/build.yml
lightning-invoice/src/lib.rs
lightning/src/util/message_signing.rs

index d24b2be7a45dc3fd7a0b4f95f741552b6a8424a4..716d4b0b751d5f7c5c1837e3ab5575c913b6b7a2 100644 (file)
@@ -165,7 +165,9 @@ jobs:
   check_commits:
     runs-on: ubuntu-latest
     env:
-      TOOLCHAIN: stable
+      # rustc 1.53 regressed and panics when building our (perfectly fine) docs.
+      # See https://github.com/rust-lang/rust/issues/84738
+      TOOLCHAIN: 1.52.1
     steps:
       - name: Checkout source code
         uses: actions/checkout@v2
index fa6a8eedb0fb434385ebe25b553a2e03a3543675..2ce58f296f9b26b06ec4c92d8b634a57f680d5b3 100644 (file)
@@ -60,12 +60,16 @@ const MAX_EXPIRY_TIME: u64 = 60 * 60 * 24 * 356;
 /// Default expiry time as defined by [BOLT 11].
 ///
 /// [BOLT 11]: https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md
-const DEFAULT_EXPIRY_TIME: u64 = 3600;
+pub const DEFAULT_EXPIRY_TIME: u64 = 3600;
 
 /// Default minimum final CLTV expiry as defined by [BOLT 11].
 ///
+/// Note that this is *not* the same value as rust-lightning's minimum CLTV expiry, which is
+/// provided in [`MIN_FINAL_CLTV_EXPIRY`].
+///
 /// [BOLT 11]: https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md
-const DEFAULT_MIN_FINAL_CLTV_EXPIRY: u64 = 18;
+/// [`MIN_FINAL_CLTV_EXPIRY`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY
+pub const DEFAULT_MIN_FINAL_CLTV_EXPIRY: u64 = 18;
 
 /// This function is used as a static assert for the size of `SystemTime`. If the crate fails to
 /// compile due to it this indicates that your system uses unexpected bounds for `SystemTime`. You
index c39da1d533e51b7fbc0f94f30b1947040139be54..69c802e7a0ab45a89bc904afa88f784fc8d061d1 100644 (file)
 //! Note this is not part of the specs, but follows lnd's signing and verifying protocol, which can is defined as follows:
 //!
 //! signature = zbase32(SigRec(sha256d(("Lightning Signed Message:" + msg)))
-//! zbase32 from https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
+//! zbase32 from <https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt>
 //! SigRec has first byte 31 + recovery id, followed by 64 byte sig.
 //!
 //! This implementation is compatible with both lnd's and c-lightning's
 //!
-//! https://lightning.readthedocs.io/lightning-signmessage.7.html
-//! https://api.lightning.community/#signmessage
+//! <https://lightning.readthedocs.io/lightning-signmessage.7.html>
+//! <https://api.lightning.community/#signmessage>
 
 use prelude::*;
 use crate::util::zbase32;