X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Ffunctional_tests.rs;h=073f3578de60b4419ed196d4b39ae5758942d0fe;hb=dac8b7b399d020bc79a6a6c4a119345da0ee8acd;hp=d6c4716b19d737b12283678f6c345e0b5dc01de9;hpb=e3968e09939b0b48ec7b4b614a75018c0d3114b0;p=rust-lightning diff --git a/lightning/src/ln/functional_tests.rs b/lightning/src/ln/functional_tests.rs index d6c4716b..073f3578 100644 --- a/lightning/src/ln/functional_tests.rs +++ b/lightning/src/ln/functional_tests.rs @@ -1879,11 +1879,12 @@ fn test_inbound_outbound_capacity_is_not_zero() { assert_eq!(channels0.len(), 1); assert_eq!(channels1.len(), 1); - assert_eq!(channels0[0].inbound_capacity_msat, 95000000); - assert_eq!(channels1[0].outbound_capacity_msat, 95000000); + let reserve = Channel::::get_holder_selected_channel_reserve_satoshis(100000); + assert_eq!(channels0[0].inbound_capacity_msat, 95000000 - reserve*1000); + assert_eq!(channels1[0].outbound_capacity_msat, 95000000 - reserve*1000); - assert_eq!(channels0[0].outbound_capacity_msat, 100000 * 1000 - 95000000); - assert_eq!(channels1[0].inbound_capacity_msat, 100000 * 1000 - 95000000); + assert_eq!(channels0[0].outbound_capacity_msat, 100000 * 1000 - 95000000 - reserve*1000); + assert_eq!(channels1[0].inbound_capacity_msat, 100000 * 1000 - 95000000 - reserve*1000); } fn commit_tx_fee_msat(feerate: u32, num_htlcs: u64) -> u64 {