-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add missing UnfinishedBlock and SubEpochSummary types
- Loading branch information
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use crate::streamable_struct; | ||
use crate::Bytes32; | ||
use chia_streamable_macro::Streamable; | ||
|
||
streamable_struct!(SubEpochSummary { | ||
prev_subepoch_summary_hash: Bytes32, | ||
reward_chain_hash: Bytes32, // hash of reward chain at end of last segment | ||
num_blocks_overflow: u8, // How many more blocks than 384*(N-1) | ||
new_difficulty: Option<u64>, // Only once per epoch (diff adjustment) | ||
new_sub_slot_iters: Option<u64>, // Only once per epoch (diff adjustment) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use chia_streamable_macro::Streamable; | ||
|
||
use crate::streamable_struct; | ||
use crate::EndOfSubSlotBundle; | ||
use crate::Program; | ||
use crate::RewardChainBlockUnfinished; | ||
use crate::VDFProof; | ||
use crate::{Foliage, FoliageTransactionBlock, TransactionsInfo}; | ||
|
||
streamable_struct! (UnfinishedBlock { | ||
// Full block, without the final VDFs | ||
finished_sub_slots: Vec<EndOfSubSlotBundle>, // If first sb | ||
reward_chain_block: RewardChainBlockUnfinished, // Reward chain trunk data | ||
challenge_chain_sp_proof: Option<VDFProof>, // If not first sp in sub-slot | ||
reward_chain_sp_proof: Option<VDFProof>, // If not first sp in sub-slot | ||
foliage: Foliage, // Reward chain foliage data | ||
foliage_transaction_block: Option<FoliageTransactionBlock>, // Reward chain foliage data (tx block) | ||
transactions_info: Option<TransactionsInfo>, // Reward chain foliage data (tx block additional) | ||
transactions_generator: Option<Program>, // Program that generates transactions | ||
transactions_generator_ref_list: Vec<u32>, // List of block heights of previous generators referenced in this block | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters