F::Target: 'static + FeeEstimator,
L::Target: 'static + Logger,
P::Target: 'static + Persist<<CM::Target as AChannelManager>::Signer>,
- PS::Target: 'static + Persister<'a, CM, L, SC>,
+ PS::Target: 'static + Persister<'a, CM, L, S>,
CM::Target: AChannelManager + Send + Sync,
OM::Target: AOnionMessenger + Send + Sync,
PM::Target: APeerManager + Send + Sync,
if let Some(duration_since_epoch) = fetch_time() {
if update_scorer(scorer, &event, duration_since_epoch) {
log_trace!(logger, "Persisting scorer after update");
- if let Err(e) = persister.persist_scorer(&scorer) {
+ if let Err(e) = persister.persist_scorer(&*scorer) {
log_error!(logger, "Error: Failed to persist scorer, check your disk and permissions {}", e);
// We opt not to abort early on persistence failure here as persisting
// the scorer is non-critical and we still hope that it will have
F::Target: 'static + FeeEstimator,
L::Target: 'static + Logger,
P::Target: 'static + Persist<<CM::Target as AChannelManager>::Signer>,
- PS::Target: 'static + Persister<'a, CM, L, SC>,
+ PS::Target: 'static + Persister<'a, CM, L, S>,
CM::Target: AChannelManager + Send + Sync,
OM::Target: AOnionMessenger + Send + Sync,
PM::Target: APeerManager + Send + Sync,
/// Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
///
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
-pub trait Persister<'a, CM: Deref, L: Deref, S: WriteableScore<'a>>
+pub trait Persister<'a, CM: Deref, L: Deref, S: Deref>
where
CM::Target: 'static + AChannelManager,
L::Target: 'static + Logger,
+ S::Target: WriteableScore<'a>,
{
/// Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
///
}
-impl<'a, A: KVStore + ?Sized, CM: Deref, L: Deref, S: WriteableScore<'a>> Persister<'a, CM, L, S> for A
+impl<'a, A: KVStore + ?Sized, CM: Deref, L: Deref, S: Deref> Persister<'a, CM, L, S> for A
where
CM::Target: 'static + AChannelManager,
L::Target: 'static + Logger,
+ S::Target: WriteableScore<'a>,
{
fn persist_manager(&self, channel_manager: &CM) -> Result<(), io::Error> {
self.write(CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE,