Skip to content

Commit 528445c

Browse files
authored
Merge pull request #190 from ergoplatform/i189-remove-rescan-height
remove rescan_height and do the wallet rescan from the genesis #189;
2 parents d308ae3 + a2e6f72 commit 528445c

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

core/src/cli_commands/bootstrap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ pub(crate) fn perform_bootstrap_chained_transaction(
530530

531531
info!("Minted tokens: {:?}", token_ids);
532532

533-
Ok(OracleConfig::create(config, token_ids, height)?)
533+
Ok(OracleConfig::create(config, token_ids)?)
534534
}
535535

536536
/// An instance of this struct is created from an operator-provided YAML file.

core/src/oracle_config.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ pub struct OracleConfig {
5151
pub update_box_wrapper_inputs: UpdateBoxWrapperInputs,
5252
pub ballot_box_wrapper_inputs: BallotBoxWrapperInputs,
5353
pub token_ids: TokenIds,
54-
pub rescan_height: u32,
5554
}
5655

5756
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
@@ -101,7 +100,6 @@ impl OracleConfig {
101100
pub fn create(
102101
bootstrap: BootstrapConfig,
103102
token_ids: TokenIds,
104-
rescan_height: u32,
105103
) -> Result<Self, OracleConfigError> {
106104
let oracle_box_wrapper_inputs = OracleBoxWrapperInputs::build_with(
107105
bootstrap.oracle_contract_parameters.clone(),
@@ -149,7 +147,6 @@ impl OracleConfig {
149147
ballot_box_wrapper_inputs,
150148
update_box_wrapper_inputs,
151149
token_ids,
152-
rescan_height,
153150
})
154151
}
155152

core/src/oracle_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,6 @@ fn register_and_save_scans_inner() -> std::result::Result<(), Error> {
534534
log::info!("Registering UTXO-Set Scans");
535535
save_scan_ids_locally(scans)?;
536536
log::info!("Triggering wallet rescan");
537-
rescan_from_height(ORACLE_CONFIG.rescan_height)?;
537+
rescan_from_height(0)?;
538538
Ok(())
539539
}

core/src/serde.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub(crate) struct OracleConfigSerde {
5656
update_contract_parameters: UpdateContractParametersSerde,
5757
ballot_contract_parameters: BallotContractParametersSerde,
5858
token_ids: TokenIds,
59-
rescan_height: u32,
6059
}
6160

6261
#[derive(Debug, Error, From)]
@@ -130,7 +129,6 @@ impl From<OracleConfig> for OracleConfigSerde {
130129
ballot_contract_parameters,
131130
update_contract_parameters,
132131
token_ids: c.token_ids,
133-
rescan_height: c.rescan_height,
134132
}
135133
}
136134
}
@@ -244,7 +242,6 @@ impl TryFrom<OracleConfigSerde> for OracleConfig {
244242
update_box_wrapper_inputs,
245243
ballot_box_wrapper_inputs,
246244
token_ids: c.token_ids,
247-
rescan_height: c.rescan_height,
248245
})
249246
}
250247
}

0 commit comments

Comments
 (0)