File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -413,7 +413,7 @@ mod handlers {
413
413
let snapshot_store = snapshot_store. read ( ) . await ;
414
414
match snapshot_store. get_snapshot_details ( digest) . await {
415
415
Ok ( Some ( snapshot) ) => {
416
- let filename = format ! ( "testnet .{}.tar.gz" , snapshot. digest) ;
416
+ let filename = format ! ( "{} .{}.tar.gz" , config . network , snapshot. digest) ;
417
417
let snapshot_uri = format ! (
418
418
"{}/{}/snapshot_download/{}" ,
419
419
config. server_url, SERVER_BASE_PATH , filename
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ async fn main() -> Result<(), String> {
141
141
let handle = tokio:: spawn ( async move {
142
142
let runtime = AggregatorRuntime :: new (
143
143
args. snapshot_interval * 1000 ,
144
+ config. network . clone ( ) ,
144
145
config. db_directory . clone ( ) ,
145
146
snapshot_directory,
146
147
beacon_store. clone ( ) ,
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ pub struct AggregatorRuntime {
48
48
/// Interval between each snapshot, in seconds
49
49
interval : u32 ,
50
50
51
+ /// Cardano network
52
+ network : String ,
53
+
51
54
/// DB directory to snapshot
52
55
db_directory : PathBuf ,
53
56
@@ -71,6 +74,7 @@ impl AggregatorRuntime {
71
74
/// AggregatorRuntime factory
72
75
pub fn new (
73
76
interval : u32 ,
77
+ network : String ,
74
78
db_directory : PathBuf ,
75
79
snapshot_directory : PathBuf ,
76
80
beacon_store : BeaconStoreWrapper ,
@@ -80,6 +84,7 @@ impl AggregatorRuntime {
80
84
) -> Self {
81
85
Self {
82
86
interval,
87
+ network,
83
88
db_directory,
84
89
snapshot_directory,
85
90
beacon_store,
@@ -119,7 +124,8 @@ impl AggregatorRuntime {
119
124
120
125
match self . manage_trigger_snapshot ( & message, & beacon) . await {
121
126
Ok ( true ) => {
122
- let snapshot_name = format ! ( "testnet.{}.tar.gz" , & digest_result. digest) ;
127
+ let snapshot_name =
128
+ format ! ( "{}.{}.tar.gz" , self . network, & digest_result. digest) ;
123
129
let snapshot_path = snapshotter. snapshot ( & snapshot_name) ?;
124
130
125
131
let uploaded_snapshot_location = self
You can’t perform that action at this time.
0 commit comments