Skip to content

Commit 48ea64f

Browse files
committed
fix: Aptos made some really strange choices about loading the config. We're going to see if forcing a test configuration resolves the issue of trying to unwrap inappropriately formatted validator fields from the default node config struct.
1 parent c6fed14 commit 48ea64f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

util/movement-aptos/movement-aptos-core/src/movement_aptos.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ where
180180
#[cfg(test)]
181181
mod tests {
182182
use super::*;
183+
use aptos_node::create_single_node_test_config;
184+
use rand::thread_rng;
183185
use std::path::Path;
184186

185187
#[tracing_test::traced_test]
@@ -200,7 +202,17 @@ mod tests {
200202
tokio::fs::create_dir_all(db_dir.clone()).await?;
201203
}
202204

203-
let mut node_config = NodeConfig::default();
205+
let mut rng = thread_rng();
206+
let mut node_config = create_single_node_test_config(
207+
&None,
208+
&None,
209+
working_dir.as_path(),
210+
false,
211+
true,
212+
false,
213+
&aptos_cached_packages::head_release_bundle().clone(),
214+
rng,
215+
)?;
204216
node_config.base.working_dir = Some(working_dir.clone());
205217
node_config.storage.dir = db_dir.clone();
206218

0 commit comments

Comments
 (0)