anya-core 1.2.0

Enterprise-grade Bitcoin Infrastructure Platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::error::Error;
#[derive(Clone)]
struct ChannelPersister {
    storage: Arc<dyn ChannelStorage>,
}

impl Persist for ChannelPersister {
    fn persist_channel(&self, channel_id: &ChannelId, data: &ChannelMonitor) -> Result<()> {
        self.storage.store_channel(channel_id, data.encode())
    }
}