mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 07:09:59 -07:00
global: MASSIVE snapshot
This commit is contained in:
@@ -32,7 +32,7 @@ impl Query {
|
||||
//
|
||||
// let iter = DateIndexIter::new(computer, start, current_height.to_usize());
|
||||
//
|
||||
// let vecs = &computer.chain.indexes_to_fee_rate.dateindex;
|
||||
// let vecs = &computer.transactions.transaction.indexes_to_fee_rate.dateindex;
|
||||
// let mut min = vecs.unwrap_min().iter();
|
||||
// let mut pct10 = vecs.unwrap_pct10().iter();
|
||||
// let mut pct25 = vecs.unwrap_pct25().iter();
|
||||
|
||||
@@ -16,8 +16,8 @@ impl Query {
|
||||
let iter = DateIndexIter::new(computer, start, current_height.to_usize());
|
||||
|
||||
let mut fees = computer
|
||||
.chain
|
||||
.transaction
|
||||
.transactions
|
||||
.fees
|
||||
.indexes_to_fee
|
||||
.sats
|
||||
.dateindex
|
||||
|
||||
@@ -17,8 +17,8 @@ impl Query {
|
||||
|
||||
// coinbase = subsidy + fees
|
||||
let mut rewards = computer
|
||||
.chain
|
||||
.coinbase
|
||||
.blocks
|
||||
.rewards
|
||||
.indexes_to_coinbase
|
||||
.sats
|
||||
.dateindex
|
||||
|
||||
@@ -16,15 +16,15 @@ impl Query {
|
||||
let iter = DateIndexIter::new(computer, start, current_height.to_usize());
|
||||
|
||||
let mut sizes_vec = computer
|
||||
.chain
|
||||
.block
|
||||
.blocks
|
||||
.size
|
||||
.indexes_to_block_size
|
||||
.dateindex
|
||||
.unwrap_average()
|
||||
.iter();
|
||||
let mut weights_vec = computer
|
||||
.chain
|
||||
.block
|
||||
.blocks
|
||||
.weight
|
||||
.indexes_to_block_weight
|
||||
.dateindex
|
||||
.unwrap_average()
|
||||
|
||||
@@ -48,8 +48,8 @@ impl<'a> DateIndexIter<'a> {
|
||||
+ 1;
|
||||
let mut timestamps = self
|
||||
.computer
|
||||
.chain
|
||||
.block
|
||||
.blocks
|
||||
.time
|
||||
.timeindexes_to_timestamp
|
||||
.dateindex
|
||||
.as_ref()
|
||||
|
||||
@@ -43,8 +43,8 @@ impl Query {
|
||||
|
||||
// Get timestamps using difficultyepoch_to_timestamp for epoch start
|
||||
let epoch_start_timestamp = computer
|
||||
.chain
|
||||
.block
|
||||
.blocks
|
||||
.time
|
||||
.difficultyepoch_to_timestamp
|
||||
.read_once(current_epoch)?;
|
||||
let current_timestamp = indexer
|
||||
|
||||
@@ -22,9 +22,9 @@ pub fn iter_difficulty_epochs(
|
||||
.unwrap_or_default();
|
||||
|
||||
let mut epoch_to_height_iter = computer.indexes.block.difficultyepoch_to_first_height.iter();
|
||||
let mut epoch_to_timestamp_iter = computer.chain.block.difficultyepoch_to_timestamp.iter();
|
||||
let mut epoch_to_timestamp_iter = computer.blocks.time.difficultyepoch_to_timestamp.iter();
|
||||
let mut epoch_to_difficulty_iter = computer
|
||||
.chain
|
||||
.blocks
|
||||
.mining
|
||||
.indexes_to_difficulty
|
||||
.difficultyepoch
|
||||
|
||||
@@ -26,7 +26,7 @@ impl Query {
|
||||
.read_once(current_height)?;
|
||||
|
||||
let current_hashrate = *computer
|
||||
.chain
|
||||
.blocks
|
||||
.mining
|
||||
.indexes_to_hash_rate
|
||||
.dateindex
|
||||
@@ -57,7 +57,7 @@ impl Query {
|
||||
|
||||
// Create iterators for the loop
|
||||
let mut hashrate_iter = computer
|
||||
.chain
|
||||
.blocks
|
||||
.mining
|
||||
.indexes_to_hash_rate
|
||||
.dateindex
|
||||
@@ -65,8 +65,8 @@ impl Query {
|
||||
.iter();
|
||||
|
||||
let mut timestamp_iter = computer
|
||||
.chain
|
||||
.block
|
||||
.blocks
|
||||
.time
|
||||
.timeindexes_to_timestamp
|
||||
.dateindex
|
||||
.as_ref()
|
||||
|
||||
@@ -13,8 +13,8 @@ impl Query {
|
||||
let start_block = Height::from(current_height.to_usize().saturating_sub(block_count - 1));
|
||||
|
||||
let mut coinbase_iter = computer
|
||||
.chain
|
||||
.coinbase
|
||||
.blocks
|
||||
.rewards
|
||||
.indexes_to_coinbase
|
||||
.sats
|
||||
.height
|
||||
@@ -22,16 +22,16 @@ impl Query {
|
||||
.unwrap()
|
||||
.iter();
|
||||
let mut fee_iter = computer
|
||||
.chain
|
||||
.transaction
|
||||
.transactions
|
||||
.fees
|
||||
.indexes_to_fee
|
||||
.sats
|
||||
.height
|
||||
.unwrap_sum()
|
||||
.iter();
|
||||
let mut tx_count_iter = computer
|
||||
.chain
|
||||
.transaction
|
||||
.transactions
|
||||
.count
|
||||
.indexes_to_tx_count
|
||||
.height
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user