Remove a few final ::-containing paths in generic args
authorMatt Corallo <git@bluematt.me>
Fri, 11 Sep 2020 01:37:08 +0000 (21:37 -0400)
committerMatt Corallo <git@bluematt.me>
Fri, 11 Sep 2020 01:58:44 +0000 (21:58 -0400)
This cleans upa few last cases of functions/objects which our C
bindings generator doesn't know how to read.

lightning/src/ln/chan_utils.rs
lightning/src/routing/network_graph.rs

index c5e36e2d0ceef192094f356cbb1e434fe2868bb7..beec838391a2e3beba781cdbe264fc8f81339a13 100644 (file)
@@ -188,7 +188,7 @@ impl Readable for CounterpartyCommitmentSecrets {
 ///
 /// Note that this is infallible iff we trust that at least one of the two input keys are randomly
 /// generated (ie our own).
-pub fn derive_private_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitment_point: &PublicKey, base_secret: &SecretKey) -> Result<SecretKey, secp256k1::Error> {
+pub fn derive_private_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitment_point: &PublicKey, base_secret: &SecretKey) -> Result<SecretKey, SecpError> {
        let mut sha = Sha256::engine();
        sha.input(&per_commitment_point.serialize());
        sha.input(&PublicKey::from_secret_key(&secp_ctx, &base_secret).serialize());
@@ -205,7 +205,7 @@ pub fn derive_private_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_co
 ///
 /// Note that this is infallible iff we trust that at least one of the two input keys are randomly
 /// generated (ie our own).
-pub fn derive_public_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitment_point: &PublicKey, base_point: &PublicKey) -> Result<PublicKey, secp256k1::Error> {
+pub fn derive_public_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitment_point: &PublicKey, base_point: &PublicKey) -> Result<PublicKey, SecpError> {
        let mut sha = Sha256::engine();
        sha.input(&per_commitment_point.serialize());
        sha.input(&base_point.serialize());
@@ -219,7 +219,7 @@ pub fn derive_public_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_com
 ///
 /// Note that this is infallible iff we trust that at least one of the two input keys are randomly
 /// generated (ie our own).
-pub fn derive_private_revocation_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitment_secret: &SecretKey, revocation_base_secret: &SecretKey) -> Result<SecretKey, secp256k1::Error> {
+pub fn derive_private_revocation_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitment_secret: &SecretKey, revocation_base_secret: &SecretKey) -> Result<SecretKey, SecpError> {
        let revocation_base_point = PublicKey::from_secret_key(&secp_ctx, &revocation_base_secret);
        let per_commitment_point = PublicKey::from_secret_key(&secp_ctx, &per_commitment_secret);
 
@@ -252,7 +252,7 @@ pub fn derive_private_revocation_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1
 ///
 /// Note that this is infallible iff we trust that at least one of the two input keys are randomly
 /// generated (ie our own).
-pub fn derive_public_revocation_key<T: secp256k1::Verification>(secp_ctx: &Secp256k1<T>, per_commitment_point: &PublicKey, revocation_base_point: &PublicKey) -> Result<PublicKey, secp256k1::Error> {
+pub fn derive_public_revocation_key<T: secp256k1::Verification>(secp_ctx: &Secp256k1<T>, per_commitment_point: &PublicKey, revocation_base_point: &PublicKey) -> Result<PublicKey, SecpError> {
        let rev_append_commit_hash_key = {
                let mut sha = Sha256::engine();
                sha.input(&revocation_base_point.serialize());
index 6e51b7d092ab92b86067d71f45703213b31829f3..0a779e1e06cabac5ff94a4c6e8c288abc47cb932 100644 (file)
@@ -260,7 +260,7 @@ pub struct DirectionalChannelInfo {
        /// Mostly redundant with the data we store in fields explicitly.
        /// Everything else is useful only for sending out for initial routing sync.
        /// Not stored if contains excess data to prevent DoS.
-       pub last_update_message: Option<msgs::ChannelUpdate>,
+       pub last_update_message: Option<ChannelUpdate>,
 }
 
 impl fmt::Display for DirectionalChannelInfo {
@@ -300,7 +300,7 @@ pub struct ChannelInfo {
        /// Mostly redundant with the data we store in fields explicitly.
        /// Everything else is useful only for sending out for initial routing sync.
        /// Not stored if contains excess data to prevent DoS.
-       pub announcement_message: Option<msgs::ChannelAnnouncement>,
+       pub announcement_message: Option<ChannelAnnouncement>,
 }
 
 impl fmt::Display for ChannelInfo {
@@ -371,7 +371,7 @@ pub struct NodeAnnouncementInfo {
        /// Mostly redundant with the data we store in fields explicitly.
        /// Everything else is useful only for sending out for initial routing sync.
        /// Not stored if contains excess data to prevent DoS.
-       pub announcement_message: Option<msgs::NodeAnnouncement>
+       pub announcement_message: Option<NodeAnnouncement>
 }
 
 impl Writeable for NodeAnnouncementInfo {