Skip to content

Commit

Permalink
Merge branch 'mk/parallel_client' of github.com:keep-starknet-strange…
Browse files Browse the repository at this point in the history
…/raito into mk/parallel_client
  • Loading branch information
maciejka committed Oct 18, 2024
2 parents 4cd4d12 + 7269421 commit ccb858c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 1 addition & 5 deletions packages/consensus/src/types/utxo_set.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,10 @@ pub impl UtxoSetImpl of UtxoSetTrait {
if (!is_pubscript_unspendable(outpoint.data.pk_script)) {
if outpoint.data.cached {
self.num_cached += 1;

} else {
self.leaves_to_add.append(hash);
}
if outpoint.data.cached {
println!("inserting outpoint: {:?}, hash: {}", outpoint, hash);
} else {
self.cache.insert(hash, TX_OUTPUT_STATUS_NONE);
}
self.cache.insert(hash, TX_OUTPUT_STATUS_UNSPENT);
}
Result::Ok(())
Expand Down
8 changes: 5 additions & 3 deletions scripts/data/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def generate_data(
else:
logger.debug("Fetching initial chain state...")

logger.debug(f"Block range: [{initial_height}, {initial_height + num_blocks - 1}]")
print(f"blocks: {initial_height} - {initial_height + num_blocks - 1}")

chain_state = (
fetch_chain_state_fast(initial_height)
Expand All @@ -341,8 +341,10 @@ def generate_data(
utreexo_data = {}

for i in range(num_blocks):
logger.debug(
f"Fetching block {initial_height + i + 1} {i + 1}/{num_blocks}..."
print(
f"\rFetching block {initial_height + i + 1}/{initial_height + num_blocks}",
end="",
flush=True,
)

# Interblock cache
Expand Down

0 comments on commit ccb858c

Please sign in to comment.