X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Frouter.rs;h=00c3ee6bcebc947c5ba44b09ab1b5812f14a7406;hb=9fcc626ee4d23a276fc8dd87ddb2538f4d5565f9;hp=8b2e4d137fd93f83fed0904fda12f6148a1e6834;hpb=22398853c97966f42c709669fff3c63486d82993;p=rust-lightning diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 8b2e4d137..00c3ee6bc 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -1488,6 +1488,8 @@ mod tests { use ln::channelmanager; use util::test_utils; use util::ser::Writeable; + #[cfg(c_bindings)] + use util::ser::Writer; use bitcoin::hashes::sha256d::Hash as Sha256dHash; use bitcoin::hashes::Hash; @@ -4653,6 +4655,10 @@ mod tests { short_channel_id: u64, } + #[cfg(c_bindings)] + impl Writeable for BadChannelScorer { + fn write(&self, _w: &mut W) -> Result<(), ::io::Error> { unimplemented!() } + } impl Score for BadChannelScorer { fn channel_penalty_msat(&self, short_channel_id: u64, _send_amt: u64, _chan_amt: Option, _source: &NodeId, _target: &NodeId) -> u64 { if short_channel_id == self.short_channel_id { u64::max_value() } else { 0 } @@ -4665,6 +4671,11 @@ mod tests { node_id: NodeId, } + #[cfg(c_bindings)] + impl Writeable for BadNodeScorer { + fn write(&self, _w: &mut W) -> Result<(), ::io::Error> { unimplemented!() } + } + impl Score for BadNodeScorer { fn channel_penalty_msat(&self, _short_channel_id: u64, _send_amt: u64, _chan_amt: Option, _source: &NodeId, target: &NodeId) -> u64 { if *target == self.node_id { u64::max_value() } else { 0 }