Skip to content

Commit

Permalink
fix: off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludo Galabru committed Aug 2, 2023
1 parent 8b46a5d commit 94e1141
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/hord-cli/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub fn should_sync_hord_db(config: &Config, ctx: &Context) -> Result<Option<(u64

start_block += 1;

if start_block < end_block {
if start_block <= end_block {
Ok(Some((start_block, end_block)))
} else {
Ok(None)
Expand Down
10 changes: 4 additions & 6 deletions components/hord-cli/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod runloops;

use crate::cli::fetch_and_standardize_block;
use crate::config::{Config, PredicatesApi, PredicatesApiConfig};
use crate::core::pipeline::processors::inscription_indexing::{process_blocks};
use crate::core::pipeline::processors::inscription_indexing::process_blocks;
use crate::core::pipeline::processors::start_inscription_indexing_processor;
use crate::core::pipeline::{download_and_pipeline_blocks, PostProcessorCommand};
use crate::core::protocol::sequencing::update_storage_and_augment_bitcoin_block_with_inscription_transfer_data_tx;
Expand All @@ -30,17 +30,15 @@ use chainhook_sdk::chainhooks::types::{

use chainhook_sdk::indexer::bitcoin::build_http_client;
use chainhook_sdk::observer::{
start_event_observer, BitcoinConfig, EventObserverConfig, HandleBlock,
ObserverEvent,
start_event_observer, BitcoinConfig, EventObserverConfig, HandleBlock, ObserverEvent,
};
use chainhook_sdk::types::{
BitcoinBlockData, BitcoinNetwork, OrdinalInscriptionTransferData,
OrdinalOperation,
BitcoinBlockData, BitcoinNetwork, OrdinalInscriptionTransferData, OrdinalOperation,
};
use chainhook_sdk::utils::Context;
use redis::{Commands, Connection};

use std::collections::{BTreeMap};
use std::collections::BTreeMap;
use std::sync::mpsc::{channel, Sender};
use std::sync::Arc;

Expand Down

0 comments on commit 94e1141

Please sign in to comment.