X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannelmonitor.rs;h=d83171bd1ec981a96500a1356ea531034d4b359f;hb=85c03c11394aeb86606f838c079ac17c7ec864d5;hp=154d8ccf70d29ccd641c85f9105b54b9783c707e;hpb=0150b1f6f6efd91f1fd07bdb263cb30505430415;p=rust-lightning diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 154d8ccf..d83171bd 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -513,7 +513,7 @@ enum OnchainEvent { /// Higher-level cache structure needed to re-generate bumped claim txn if needed #[derive(Clone, PartialEq)] -struct ClaimTxBumpMaterial { +pub struct ClaimTxBumpMaterial { // At every block tick, used to check if pending claiming tx is taking too // much time for confirmation and we need to bump it. height_timer: u32, @@ -621,6 +621,9 @@ pub struct ChannelMonitor { // Key is identifier of the pending claim request, i.e the txid of the initial claiming transaction generated by // us and is immutable until all outpoint of the claimable set are post-anti-reorg-delay solved. // Entry is cache of elements need to generate a bumped claiming transaction (see ClaimTxBumpMaterial) + #[cfg(test)] // Used in functional_test to verify sanitization + pub pending_claim_requests: HashMap, + #[cfg(not(test))] pending_claim_requests: HashMap, // Used to link outpoints claimed in a connected block to a pending claim request. @@ -629,6 +632,9 @@ pub struct ChannelMonitor { // is txid of the initial claiming transaction and is immutable until outpoint is // post-anti-reorg-delay solved, confirmaiton_block is used to erase entry if // block with output gets disconnected. + #[cfg(test)] // Used in functional_test to verify sanitization + pub claimable_outpoints: HashMap, + #[cfg(not(test))] claimable_outpoints: HashMap, // Used to track onchain events, i.e transactions parts of channels confirmed on chain, on which