mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-19 04:43:36 +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",
|
||||
"common",
|
||||
"nssa",
|
||||
"nssa_core",
|
||||
"rocksdb",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
@ -127,6 +127,6 @@
|
||||
},
|
||||
"resubscribe_interval_millis": 1000,
|
||||
"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,
|
||||
"mempool_max_size": 10000,
|
||||
"block_create_timeout_millis": 10000,
|
||||
"retry_pending_blocks_timeout_millis": 240000,
|
||||
"port": 0,
|
||||
"initial_accounts": [
|
||||
{
|
||||
|
||||
@ -46,6 +46,7 @@ pub struct TestContext {
|
||||
wallet: WalletCore,
|
||||
_temp_sequencer_dir: TempDir,
|
||||
_temp_wallet_dir: TempDir,
|
||||
_temp_indexer_dir: Option<TempDir>,
|
||||
}
|
||||
|
||||
impl TestContext {
|
||||
@ -127,6 +128,12 @@ impl TestContext {
|
||||
indexer_config.sequencer_client_config.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_loop_handle = Some(tokio::spawn(async move {
|
||||
@ -142,6 +149,7 @@ impl TestContext {
|
||||
wallet,
|
||||
_temp_sequencer_dir: temp_sequencer_dir,
|
||||
_temp_wallet_dir: temp_wallet_dir,
|
||||
_temp_indexer_dir: Some(temp_indexer_dir),
|
||||
})
|
||||
} else {
|
||||
Ok(Self {
|
||||
@ -153,6 +161,7 @@ impl TestContext {
|
||||
wallet,
|
||||
_temp_sequencer_dir: temp_sequencer_dir,
|
||||
_temp_wallet_dir: temp_wallet_dir,
|
||||
_temp_indexer_dir: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -255,6 +264,7 @@ impl Drop for TestContext {
|
||||
wallet: _,
|
||||
_temp_sequencer_dir,
|
||||
_temp_wallet_dir,
|
||||
_temp_indexer_dir,
|
||||
} = self;
|
||||
|
||||
sequencer_loop_handle.abort();
|
||||
|
||||
@ -5,7 +5,6 @@ edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
common.workspace = true
|
||||
nssa_core.workspace = true
|
||||
nssa.workspace = true
|
||||
|
||||
thiserror.workspace = true
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum DbError {
|
||||
#[error("RocksDb error")]
|
||||
#[error("RocksDb error {additional_info:#?}")]
|
||||
RocksDbError {
|
||||
error: rocksdb::Error,
|
||||
additional_info: Option<String>,
|
||||
},
|
||||
#[error("Serialization error")]
|
||||
#[error("Serialization error {additional_info:#?}")]
|
||||
SerializationError {
|
||||
error: borsh::io::Error,
|
||||
additional_info: Option<String>,
|
||||
},
|
||||
#[error("Logic Error")]
|
||||
#[error("Logic Error {additional_info:#?}")]
|
||||
DbInteractionError { additional_info: String },
|
||||
}
|
||||
|
||||
|
||||
@ -81,9 +81,9 @@ impl RocksDBIO {
|
||||
Ok(dbio)
|
||||
} else if let Some((block, initial_state)) = start_data {
|
||||
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_is_first_block_set()?;
|
||||
dbio.put_meta_last_block_in_db(block_id)?;
|
||||
|
||||
// First breakpoint setup
|
||||
dbio.put_breakpoint(0, initial_state)?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user