This commit is contained in:
Boog900 2024-08-01 21:15:07 +01:00
parent 5709111144
commit 524946f840
No known key found for this signature in database
GPG key ID: 42AB1287CB0041C2
2 changed files with 5 additions and 8 deletions

View file

@ -63,10 +63,7 @@ async fn calculate_diff_3000000_3002000() -> Result<(), tower::BoxError> {
let cfg = DifficultyCacheConfig::main_net(); let cfg = DifficultyCacheConfig::main_net();
let mut db_builder = DummyDatabaseBuilder::default(); let mut db_builder = DummyDatabaseBuilder::default();
for (cum_dif, timestamp) in DIF_3000000_3002000 for (cum_dif, timestamp) in DIF_3000000_3002000.iter().take(cfg.total_block_count()) {
.iter()
.take(cfg.total_block_count())
{
db_builder.add_block( db_builder.add_block(
DummyBlockExtendedHeader::default().with_difficulty_info(*timestamp, *cum_dif), DummyBlockExtendedHeader::default().with_difficulty_info(*timestamp, *cum_dif),
) )

View file

@ -17,13 +17,13 @@ pub struct ExtendedBlockHeader {
/// ///
/// This can also be represented with `cuprate_consensus::HardFork`. /// This can also be represented with `cuprate_consensus::HardFork`.
/// ///
/// This is the same value as [`monero_serai::block::BlockHeader::major_version`]. /// This is the same value as [`monero_serai::block::BlockHeader::hardfork_version`].
pub version: u8, pub version: u8,
/// The block's hard-fork vote. /// The block's hard-fork vote.
/// ///
/// This can also be represented with `cuprate_consensus::HardFork`. /// This can also be represented with `cuprate_consensus::HardFork`.
/// ///
/// This is the same value as [`monero_serai::block::BlockHeader::minor_version`]. /// This is the same value as [`monero_serai::block::BlockHeader::hardfork_signal`].
pub vote: u8, pub vote: u8,
/// The UNIX time at which the block was mined. /// The UNIX time at which the block was mined.
pub timestamp: u64, pub timestamp: u64,
@ -72,7 +72,7 @@ pub struct VerifiedBlockInformation {
/// ///
/// [`Block::serialize`]. /// [`Block::serialize`].
pub block_blob: Vec<u8>, pub block_blob: Vec<u8>,
/// All the transactions in the block, excluding the [`Block::miner_tx`]. /// All the transactions in the block, excluding the [`Block::miner_transaction`].
pub txs: Vec<VerifiedTransactionInformation>, pub txs: Vec<VerifiedTransactionInformation>,
/// The block's hash. /// The block's hash.
/// ///
@ -119,7 +119,7 @@ pub struct AltBlockInformation {
/// ///
/// [`Block::serialize`]. /// [`Block::serialize`].
pub block_blob: Vec<u8>, pub block_blob: Vec<u8>,
/// All the transactions in the block, excluding the [`Block::miner_tx`]. /// All the transactions in the block, excluding the [`Block::miner_transaction`].
pub txs: Vec<VerifiedTransactionInformation>, pub txs: Vec<VerifiedTransactionInformation>,
/// The block's hash. /// The block's hash.
/// ///