diff --git a/.gitignore b/.gitignore index acc79fb4..7d39da08 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ tests/nodes/.ports /coverage-report /*.info +.vscode diff --git a/src/fiber/channel.rs b/src/fiber/channel.rs index d207c03c..b0dfdc0d 100644 --- a/src/fiber/channel.rs +++ b/src/fiber/channel.rs @@ -1669,7 +1669,7 @@ where commitment_fee_rate.unwrap_or(DEFAULT_COMMITMENT_FEE_RATE); let funding_fee_rate = funding_fee_rate.unwrap_or(DEFAULT_FEE_RATE); - let (funding_amount, reserved_ckb_amount) = get_funding_and_reserved_amount( + let (to_local_amount, reserved_ckb_amount) = get_funding_and_reserved_amount( funding_amount, &shutdown_script, &funding_udt_type_script, @@ -1680,7 +1680,7 @@ where &seed, self.get_local_pubkey(), self.get_remote_pubkey(), - funding_amount, + to_local_amount, reserved_ckb_amount, commitment_fee_rate, commitment_delay_epoch @@ -2337,31 +2337,28 @@ pub fn get_commitment_point(commitment_seed: &[u8; 32], commitment_number: u64) } pub(crate) fn get_funding_and_reserved_amount( - funding_amount: u128, + total_amount: u128, shutdown_script: &Script, udt_type_script: &Option