self.feerate_per_kw
}
+ pub fn get_cur_local_commitment_transaction_number(&self) -> u64 {
+ self.cur_local_commitment_transaction_number + 1
+ }
+
+ pub fn get_cur_remote_commitment_transaction_number(&self) -> u64 {
+ self.cur_remote_commitment_transaction_number + 1 - if self.channel_state & (ChannelState::AwaitingRemoteRevoke as u32) != 0 { 1 } else { 0 }
+ }
+
+ pub fn get_revoked_remote_commitment_transaction_number(&self) -> u64 {
+ self.cur_remote_commitment_transaction_number + 2
+ }
+
//TODO: Testing purpose only, should be changed in another way after #81
#[cfg(test)]
pub fn get_local_keys(&self) -> &ChannelKeys {
if self.funding_tx_confirmations > 0 {
if header.bitcoin_hash() != self.last_block_connected {
self.last_block_connected = header.bitcoin_hash();
+ self.channel_monitor.last_block_hash = self.last_block_connected;
self.funding_tx_confirmations += 1;
if self.funding_tx_confirmations == Channel::derive_minimum_depth(self.channel_value_satoshis*1000, self.value_to_self_msat) as u64 {
let need_commitment_update = if non_shutdown_state == ChannelState::FundingSent as u32 {