mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-07 05:23:17 +00:00
fix: config fix
This commit is contained in:
parent
0efc522837
commit
8fa8cc33d8
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -5914,7 +5914,6 @@ dependencies = [
|
|||||||
"borsh",
|
"borsh",
|
||||||
"common",
|
"common",
|
||||||
"nssa",
|
"nssa",
|
||||||
"nssa_core",
|
|
||||||
"rocksdb",
|
"rocksdb",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -127,6 +127,6 @@
|
|||||||
},
|
},
|
||||||
"resubscribe_interval_millis": 1000,
|
"resubscribe_interval_millis": 1000,
|
||||||
"sequencer_client_config": {
|
"sequencer_client_config": {
|
||||||
"addr": "will_be_replaced_in_runtime"
|
"addr": "http://0.0.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6,6 +6,7 @@
|
|||||||
"max_num_tx_in_block": 20,
|
"max_num_tx_in_block": 20,
|
||||||
"mempool_max_size": 10000,
|
"mempool_max_size": 10000,
|
||||||
"block_create_timeout_millis": 10000,
|
"block_create_timeout_millis": 10000,
|
||||||
|
"retry_pending_blocks_timeout_millis": 240000,
|
||||||
"port": 0,
|
"port": 0,
|
||||||
"initial_accounts": [
|
"initial_accounts": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,6 +46,7 @@ pub struct TestContext {
|
|||||||
wallet: WalletCore,
|
wallet: WalletCore,
|
||||||
_temp_sequencer_dir: TempDir,
|
_temp_sequencer_dir: TempDir,
|
||||||
_temp_wallet_dir: TempDir,
|
_temp_wallet_dir: TempDir,
|
||||||
|
_temp_indexer_dir: Option<TempDir>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestContext {
|
impl TestContext {
|
||||||
@ -127,6 +128,12 @@ impl TestContext {
|
|||||||
indexer_config.sequencer_client_config.addr =
|
indexer_config.sequencer_client_config.addr =
|
||||||
Url::parse(&sequencer_addr).context("Failed to parse sequencer addr")?;
|
Url::parse(&sequencer_addr).context("Failed to parse sequencer addr")?;
|
||||||
|
|
||||||
|
let temp_indexer_dir =
|
||||||
|
tempfile::tempdir().context("Failed to create temp dir for indexer home")?;
|
||||||
|
|
||||||
|
debug!("Using temp indexer home at {:?}", temp_indexer_dir.path());
|
||||||
|
indexer_config.home = temp_indexer_dir.path().to_owned();
|
||||||
|
|
||||||
let indexer_core = IndexerCore::new(indexer_config).await?;
|
let indexer_core = IndexerCore::new(indexer_config).await?;
|
||||||
|
|
||||||
let indexer_loop_handle = Some(tokio::spawn(async move {
|
let indexer_loop_handle = Some(tokio::spawn(async move {
|
||||||
@ -142,6 +149,7 @@ impl TestContext {
|
|||||||
wallet,
|
wallet,
|
||||||
_temp_sequencer_dir: temp_sequencer_dir,
|
_temp_sequencer_dir: temp_sequencer_dir,
|
||||||
_temp_wallet_dir: temp_wallet_dir,
|
_temp_wallet_dir: temp_wallet_dir,
|
||||||
|
_temp_indexer_dir: Some(temp_indexer_dir),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
@ -153,6 +161,7 @@ impl TestContext {
|
|||||||
wallet,
|
wallet,
|
||||||
_temp_sequencer_dir: temp_sequencer_dir,
|
_temp_sequencer_dir: temp_sequencer_dir,
|
||||||
_temp_wallet_dir: temp_wallet_dir,
|
_temp_wallet_dir: temp_wallet_dir,
|
||||||
|
_temp_indexer_dir: None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,6 +264,7 @@ impl Drop for TestContext {
|
|||||||
wallet: _,
|
wallet: _,
|
||||||
_temp_sequencer_dir,
|
_temp_sequencer_dir,
|
||||||
_temp_wallet_dir,
|
_temp_wallet_dir,
|
||||||
|
_temp_indexer_dir,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
sequencer_loop_handle.abort();
|
sequencer_loop_handle.abort();
|
||||||
|
|||||||
@ -5,7 +5,6 @@ edition = "2024"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
common.workspace = true
|
common.workspace = true
|
||||||
nssa_core.workspace = true
|
|
||||||
nssa.workspace = true
|
nssa.workspace = true
|
||||||
|
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
pub enum DbError {
|
pub enum DbError {
|
||||||
#[error("RocksDb error")]
|
#[error("RocksDb error {additional_info:#?}")]
|
||||||
RocksDbError {
|
RocksDbError {
|
||||||
error: rocksdb::Error,
|
error: rocksdb::Error,
|
||||||
additional_info: Option<String>,
|
additional_info: Option<String>,
|
||||||
},
|
},
|
||||||
#[error("Serialization error")]
|
#[error("Serialization error {additional_info:#?}")]
|
||||||
SerializationError {
|
SerializationError {
|
||||||
error: borsh::io::Error,
|
error: borsh::io::Error,
|
||||||
additional_info: Option<String>,
|
additional_info: Option<String>,
|
||||||
},
|
},
|
||||||
#[error("Logic Error")]
|
#[error("Logic Error {additional_info:#?}")]
|
||||||
DbInteractionError { additional_info: String },
|
DbInteractionError { additional_info: String },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,9 +81,9 @@ impl RocksDBIO {
|
|||||||
Ok(dbio)
|
Ok(dbio)
|
||||||
} else if let Some((block, initial_state)) = start_data {
|
} else if let Some((block, initial_state)) = start_data {
|
||||||
let block_id = block.header.block_id;
|
let block_id = block.header.block_id;
|
||||||
|
dbio.put_meta_last_block_in_db(block_id)?;
|
||||||
dbio.put_meta_first_block_in_db(block)?;
|
dbio.put_meta_first_block_in_db(block)?;
|
||||||
dbio.put_meta_is_first_block_set()?;
|
dbio.put_meta_is_first_block_set()?;
|
||||||
dbio.put_meta_last_block_in_db(block_id)?;
|
|
||||||
|
|
||||||
// First breakpoint setup
|
// First breakpoint setup
|
||||||
dbio.put_breakpoint(0, initial_state)?;
|
dbio.put_breakpoint(0, initial_state)?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user