Skip to content

Commit 96641fb

Browse files
committed
Remove outdated snapshot module
1 parent 46b7ca5 commit 96641fb

File tree

6 files changed

+1
-570
lines changed

6 files changed

+1
-570
lines changed

codechain/run_node.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use ckeystore::KeyStore;
3030
use clap::ArgMatches;
3131
use clogger::{self, EmailAlarm, EmailAlarmConfig, LoggerConfig};
3232
use cnetwork::{Filters, NetworkConfig, NetworkControl, NetworkService, RoutingTable, SocketAddr};
33-
use csync::{BlockSyncExtension, BlockSyncSender, SnapshotService, TransactionSyncExtension};
33+
use csync::{BlockSyncExtension, BlockSyncSender, TransactionSyncExtension};
3434
use ctimer::TimerLoop;
3535
use ctrlc::CtrlC;
3636
use fdlimit::raise_fd_limit;
@@ -356,19 +356,6 @@ pub fn run_node(matches: &ArgMatches) -> Result<(), String> {
356356
stratum_start(&config.stratum_config(), &miner, client.client())?
357357
}
358358

359-
let _snapshot_service = {
360-
if !config.snapshot.disable.unwrap() {
361-
// FIXME: Let's make it load snapshot period dynamically to support changing the period.
362-
let client = client.client();
363-
let snapshot_period = client.common_params(BlockId::Latest).unwrap().snapshot_period();
364-
let service = SnapshotService::new(Arc::clone(&client), config.snapshot.path.unwrap(), snapshot_period);
365-
client.add_notify(Arc::downgrade(&service) as Weak<dyn ChainNotify>);
366-
Some(service)
367-
} else {
368-
None
369-
}
370-
};
371-
372359
// drop the scheme to free up genesis state.
373360
drop(scheme);
374361

sync/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ extern crate trie_standardmap;
4747
extern crate util_error;
4848

4949
mod block;
50-
mod snapshot;
5150
mod transaction;
5251

5352
pub use crate::block::{BlockSyncEvent, BlockSyncExtension, BlockSyncSender};
54-
pub use crate::snapshot::SnapshotService;
5553
pub use crate::transaction::TransactionSyncExtension;
5654

5755
#[cfg(test)]

sync/src/snapshot/error.rs

Lines changed: 0 additions & 61 deletions
This file was deleted.

sync/src/snapshot/mod.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

sync/src/snapshot/service.rs

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)