projects
/
rapid-gossip-sync-server
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow custom logger types.
[rapid-gossip-sync-server]
/
src
/
snapshot.rs
diff --git
a/src/snapshot.rs
b/src/snapshot.rs
index ac800795bf6de11125818ed49da813320ff3b938..c81cc35327715ea865cd62c24c1723611315c26f 100644
(file)
--- a/
src/snapshot.rs
+++ b/
src/snapshot.rs
@@
-5,16
+5,17
@@
use std::sync::Arc;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use lightning::routing::gossip::NetworkGraph;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use lightning::routing::gossip::NetworkGraph;
+use lightning::util::logger::Logger;
-use crate::
{config, TestLogger}
;
+use crate::
config
;
use crate::config::cache_path;
use crate::config::cache_path;
-pub(crate) struct Snapshotter {
- network_graph: Arc<NetworkGraph<
TestLogger
>>,
+pub(crate) struct Snapshotter
<L: Logger>
{
+ network_graph: Arc<NetworkGraph<
Arc<L>
>>,
}
}
-impl
Snapshotter
{
- pub fn new(network_graph: Arc<NetworkGraph<
TestLogger
>>) -> Self {
+impl
<L: Logger> Snapshotter<L>
{
+ pub fn new(network_graph: Arc<NetworkGraph<
Arc<L>
>>) -> Self {
Self { network_graph }
}
Self { network_graph }
}