You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lightning/src/chain/channelmonitor.rs
+84-15
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,7 @@
21
21
//! ChannelMonitors to get out of the HSM and onto monitoring devices.
22
22
23
23
use bitcoin::blockdata::block::BlockHeader;
24
-
use bitcoin::blockdata::transaction::{TxOut,Transaction};
25
-
use bitcoin::blockdata::transaction::OutPointasBitcoinOutPoint;
24
+
use bitcoin::blockdata::transaction::{OutPointasBitcoinOutPoint,TxOut,Transaction};
26
25
use bitcoin::blockdata::script::{Script,Builder};
27
26
use bitcoin::blockdata::opcodes;
28
27
@@ -44,13 +43,17 @@ use chain::{BestBlock, WatchedOutput};
44
43
use chain::chaininterface::{BroadcasterInterface,FeeEstimator,LowerBoundedFeeEstimator};
45
44
use chain::transaction::{OutPoint,TransactionData};
46
45
use chain::keysinterface::{SpendableOutputDescriptor,StaticPaymentOutputDescriptor,DelayedPaymentOutputDescriptor,Sign,KeysInterface};
46
+
#[cfg(anchors)]
47
+
use chain::onchaintx::ClaimEvent;
47
48
use chain::onchaintx::OnchainTxHandler;
48
49
use chain::package::{CounterpartyOfferedHTLCOutput,CounterpartyReceivedHTLCOutput,HolderFundingOutput,HolderHTLCOutput,PackageSolvingData,PackageTemplate,RevokedOutput,RevokedHTLCOutput};
49
50
use chain::Filter;
50
51
use util::logger::Logger;
51
52
use util::ser::{Readable,ReadableArgs,MaybeReadable,Writer,Writeable,U48,OptionDeserWrapper};
52
53
use util::byte_utils;
53
54
use util::events::Event;
55
+
#[cfg(anchors)]
56
+
use util::events::{AnchorDescriptor,BumpTransactionEvent};
let should_broadcast = self.should_broadcast_holder_commitment_txn(logger);
2886
2950
if should_broadcast {
2887
-
let funding_outp = HolderFundingOutput::build(self.funding_redeemscript.clone());
2951
+
let funding_outp = HolderFundingOutput::build(self.funding_redeemscript.clone(),self.channel_value_satoshis,self.onchain_tx_handler.opt_anchors());
2888
2952
let commitment_package = PackageTemplate::build_package(self.funding_info.0.txid.clone(),self.funding_info.0.indexasu32,PackageSolvingData::HolderFundingOutput(funding_outp),self.best_block.height(),false,self.best_block.height());
Copy file name to clipboardExpand all lines: lightning/src/chain/keysinterface.rs
+18
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ use util::crypto::{hkdf_extract_expand_twice, sign};
36
36
use util::ser::{Writeable,Writer,Readable,ReadableArgs};
37
37
38
38
use chain::transaction::OutPoint;
39
+
use ln::channel::ANCHOR_OUTPUT_VALUE_SATOSHI;
39
40
use ln::{chan_utils,PaymentPreimage};
40
41
use ln::chan_utils::{HTLCOutputInCommitment, make_funding_redeemscript,ChannelPublicKeys,HolderCommitmentTransaction,ChannelTransactionParameters,CommitmentTransaction,ClosingTransaction};
0 commit comments