Skip to content

Commit

Permalink
Fixed the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx committed Mar 7, 2024
1 parent d48defa commit 65ecb65
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 1 addition & 5 deletions benches/benches/vm_initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use fuel_core_types::{
Output,
Script,
Transaction,
Word,
},
fuel_types::canonical::Serialize,
fuel_vm::{
Expand Down Expand Up @@ -65,10 +64,7 @@ fn transaction<R: Rng>(
1_000_000,
script,
script_data,
Policies::new()
.with_max_fee(0)
.with_maturity(0.into())
.with_max_fee(Word::MAX),
Policies::new().with_max_fee(0).with_maturity(0.into()),
inputs,
outputs,
vec![vec![123; 32].into(); 1],
Expand Down
8 changes: 7 additions & 1 deletion crates/fuel-core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ impl FuelService {
config: Config,
) -> anyhow::Result<Self> {
let service = Self::new(combined_database, config)?;
service.runner.start_and_await().await?;
let state = service.runner.start_and_await().await?;

if !state.started() {
return Err(anyhow::anyhow!(
"The state of the service is not started: {state:?}"
));
}
Ok(service)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/fuel-core/src/service/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ mod tests {
salt,
tx_id: rng.gen(),
output_index: rng.gen(),
tx_pointer_block_height: rng.gen(),
tx_pointer_block_height: 0.into(),
tx_pointer_tx_idx: rng.gen(),
}],
contract_state: vec![contract_state],
Expand Down

0 comments on commit 65ecb65

Please sign in to comment.