resolve conflicts

This commit is contained in:
Joel 2024-09-06 15:28:48 +08:00
parent 93f99e3537
commit f58eed1c5b
2 changed files with 10 additions and 1 deletions

View File

@ -472,6 +472,15 @@ impl LogSyncManager {
async fn get_start_block_number_with_hash(
log_sync_manager: &LogSyncManager,
) -> Result<(u64, H256), anyhow::Error> {
if log_sync_manager
.config
.force_log_sync_from_start_block_number
{
let block_number = log_sync_manager.config.start_block_number;
let block_hash = log_sync_manager.get_block(block_number.into()).await?.1;
return Ok((block_number, block_hash));
}
if let Some(block_number) = log_sync_manager.store.get_log_latest_block_number()? {
if let Some(Some(val)) = log_sync_manager
.block_hash_cache

View File

@ -34,7 +34,7 @@ build_config! {
(log_contract_address, (String), "".to_string())
(log_sync_start_block_number, (u64), 0)
(force_log_sync_from_start_block_number, (bool), false)
(confirmation_block_count, (u64), 12)
(confirmation_block_count, (u64), 3)
(log_page_size, (u64), 999)
(max_cache_data_size, (usize), 100 * 1024 * 1024) // 100 MB
(cache_tx_seq_ttl, (usize), 500)