diff --git a/aptos-move/aptos-e2e-comparison-testing/src/lib.rs b/aptos-move/aptos-e2e-comparison-testing/src/lib.rs index 06507963062df2..3cc3a507ea1557 100644 --- a/aptos-move/aptos-e2e-comparison-testing/src/lib.rs +++ b/aptos-move/aptos-e2e-comparison-testing/src/lib.rs @@ -14,7 +14,7 @@ use aptos_types::{ use rocksdb::{DBWithThreadMode, SingleThreaded, DB}; use serde::{Deserialize, Serialize}; use std::{ - collections::{HashMap, HashSet}, + collections::{BTreeMap, HashMap, HashSet}, fmt, fs::{File, OpenOptions}, io::{BufRead, BufReader, BufWriter, Read, Write}, @@ -504,6 +504,17 @@ fn dump_and_compile_from_package_metadata( let manifest_str = unzip_metadata_str(&manifest_u8).unwrap(); let mut manifest = parse_source_manifest(parse_move_manifest_string(manifest_str.clone()).unwrap()).unwrap(); + let mut updated_addresses_map = BTreeMap::new(); + if manifest.addresses.is_some() { + for x in manifest.addresses.clone().unwrap() { + if x.1.is_some() || x.0 == package_info.package_name.clone().into() { + updated_addresses_map.insert(x.0, x.1); + } else { + updated_addresses_map.insert(x.0, Some(package_info.address)); + } + } + manifest.addresses = Some(updated_addresses_map); + } let fix_manifest_dep = |dep: &mut Dependency, local_str: &str| { dep.git_info = None;