mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 23:33:07 +00:00
Cleanup
This commit is contained in:
parent
5b962f3c06
commit
caae038cec
@ -122,34 +122,34 @@ impl PublicValuesTarget {
|
||||
buffer.write_target(block_difficulty)?;
|
||||
buffer.write_target(block_gaslimit)?;
|
||||
buffer.write_target(block_chain_id)?;
|
||||
buffer.write_target_vec(&block_base_fee)?;
|
||||
buffer.write_target_vec(&block_bloom)?;
|
||||
buffer.write_target_array(&block_base_fee)?;
|
||||
buffer.write_target_array(&block_bloom)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn from_buffer(buffer: &mut Buffer) -> IoResult<Self> {
|
||||
let trie_roots_before = TrieRootsTarget {
|
||||
state_root: buffer.read_target_array()?,
|
||||
transactions_root: buffer.read_target_array()?,
|
||||
receipts_root: buffer.read_target_array()?,
|
||||
state_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||
transactions_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||
receipts_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||
};
|
||||
|
||||
let trie_roots_after = TrieRootsTarget {
|
||||
state_root: buffer.read_target_array()?,
|
||||
transactions_root: buffer.read_target_array()?,
|
||||
receipts_root: buffer.read_target_array()?,
|
||||
state_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||
transactions_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||
receipts_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||
};
|
||||
|
||||
let block_metadata = BlockMetadataTarget {
|
||||
block_beneficiary: buffer.read_target_array()?,
|
||||
block_beneficiary: buffer.read_target_array()?.try_into().unwrap(),
|
||||
block_timestamp: buffer.read_target()?,
|
||||
block_number: buffer.read_target()?,
|
||||
block_difficulty: buffer.read_target()?,
|
||||
block_gaslimit: buffer.read_target()?,
|
||||
block_chain_id: buffer.read_target()?,
|
||||
block_base_fee: buffer.read_target_vec()?.try_into().unwrap(),
|
||||
block_bloom: buffer.read_target_vec()?.try_into().unwrap(),
|
||||
block_base_fee: buffer.read_target_array()?.try_into().unwrap(),
|
||||
block_bloom: buffer.read_target_array()?.try_into().unwrap(),
|
||||
};
|
||||
|
||||
Ok(Self {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user