Skip to content

Commit

Permalink
block286 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
haozhiliu authored and mi-yu committed Mar 11, 2024
1 parent ab2b963 commit 2d79879
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/subcommand/server/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use opentelemetry::trace::Tracer;
use ord_kafka_macros::trace;
use ordinals::{
block_rarity::{
is_perfect_palindrome, is_uniform_palindrome, BLOCK78_BLOCK_HEIGHT, BLOCK9_450_SAT_RANGE,
BLOCK9_BLOCK_HEIGHT, FIRST_TRANSACTION_SAT_RANGE, JPEG_BLOCK_HEIGHTS, NAKAMOTO_BLOCK_HEIGHTS,
PIZZA_RANGE_MAP, VINTAGE_BLOCK_HEIGHT,
is_perfect_palindrome, is_uniform_palindrome, BLOCK286_BLOCK_HEIGHT, BLOCK78_BLOCK_HEIGHT,
BLOCK9_450_SAT_RANGE, BLOCK9_BLOCK_HEIGHT, FIRST_TRANSACTION_SAT_RANGE, JPEG_BLOCK_HEIGHTS,
NAKAMOTO_BLOCK_HEIGHTS, PIZZA_RANGE_MAP, VINTAGE_BLOCK_HEIGHT,
},
BlockRarity,
};
Expand Down Expand Up @@ -229,6 +229,11 @@ fn get_block_rarity_chunks(
res.push((block_rarity.clone(), vec![(start, end)]))
}
}
BlockRarity::Block286 => {
if block_height == BLOCK286_BLOCK_HEIGHT {
res.push((block_rarity.clone(), vec![(start, end)]))
}
}
BlockRarity::FirstTransaction => {
if block_height == BLOCK9_BLOCK_HEIGHT && start < FIRST_TRANSACTION_SAT_RANGE.1 {
res.push((
Expand Down Expand Up @@ -532,6 +537,13 @@ mod tests {
286 * 50 * COIN_VALUE + 20_000
)]
},
BlockRarityInfo {
block_rarity: BlockRarity::Block286,
chunks: vec![(
286 * 50 * COIN_VALUE + 10_000,
286 * 50 * COIN_VALUE + 20_000
)]
},
]
);

Expand Down

0 comments on commit 2d79879

Please sign in to comment.