lnp/channel/bolt/extensions/
anchor_outputs.rs1use p2p::bolt::Messages;
15
16use crate::channel::bolt::{BoltExt, ChannelState, Error};
17use crate::channel::tx_graph::TxGraph;
18use crate::{ChannelExtension, Extension};
19
20#[derive(Debug, Default)]
21pub struct AnchorOutputs;
22
23impl Extension<BoltExt> for AnchorOutputs {
24 #[inline]
25 fn identity(&self) -> BoltExt {
26 BoltExt::AnchorOutputs
27 }
28
29 fn update_from_local(&mut self, _message: &()) -> Result<(), Error> {
30 Ok(())
32 }
33
34 #[inline]
35 fn update_from_peer(&mut self, _: &Messages) -> Result<(), Error> {
36 Ok(())
38 }
39
40 fn load_state(&mut self, _state: &ChannelState) {
41 }
43
44 fn store_state(&self, _state: &mut ChannelState) {
45 }
47}
48
49impl ChannelExtension<BoltExt> for AnchorOutputs {
50 #[inline]
51 fn new() -> Box<dyn ChannelExtension<BoltExt>>
52 where
53 Self: Sized,
54 {
55 Box::default() as Box<AnchorOutputs>
56 }
57
58 #[inline]
59 fn build_graph(
60 &self,
61 _tx_graph: &mut TxGraph,
62 _as_remote_node: bool,
63 ) -> Result<(), Error> {
64 todo!("implement anchor outputs")
65 }
66}