Skip to content

Commit

Permalink
dont make fake_scid pub
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Jan 21, 2024
1 parent 6522b64 commit f7c8d0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lightning/src/util/scid_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub fn scid_from_parts(block: u64, tx_index: u64, vout_index: u64) -> Result<u64
/// 2) phantom node payments, to get an scid for the phantom node's phantom channel
/// 3) payments intended to be intercepted will route using a fake scid (this is typically used so
/// the forwarding node can open a JIT channel to the next hop)
pub mod fake_scid {
pub(crate) mod fake_scid {
use bitcoin::blockdata::constants::ChainHash;
use bitcoin::network::constants::Network;
use crate::sign::EntropySource;
Expand All @@ -95,7 +95,7 @@ pub mod fake_scid {
/// receipt, and handle the HTLC accordingly. The namespace identifier is encrypted when encoded
/// into the fake scid.
#[derive(Copy, Clone)]
pub enum Namespace {
pub(crate) enum Namespace {
/// Phantom nodes namespace
Phantom,
/// SCID aliases for outbound private channels
Expand All @@ -109,7 +109,7 @@ pub mod fake_scid {
/// between segwit activation and the current best known height, and the tx index and output
/// index are also selected from a "reasonable" range. We add this logic because it makes it
/// non-obvious at a glance that the scid is fake, e.g. if it appears in invoice route hints.
pub fn get_fake_scid<ES: Deref>(&self, highest_seen_blockheight: u32, chain_hash: &ChainHash, fake_scid_rand_bytes: &[u8; 32], entropy_source: &ES) -> u64
pub(crate) fn get_fake_scid<ES: Deref>(&self, highest_seen_blockheight: u32, chain_hash: &ChainHash, fake_scid_rand_bytes: &[u8; 32], entropy_source: &ES) -> u64
where ES::Target: EntropySource,
{
// Ensure we haven't created a namespace that doesn't fit into the 3 bits we've allocated for
Expand Down

0 comments on commit f7c8d0d

Please sign in to comment.