mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 16:23:12 +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_difficulty)?;
|
||||||
buffer.write_target(block_gaslimit)?;
|
buffer.write_target(block_gaslimit)?;
|
||||||
buffer.write_target(block_chain_id)?;
|
buffer.write_target(block_chain_id)?;
|
||||||
buffer.write_target_vec(&block_base_fee)?;
|
buffer.write_target_array(&block_base_fee)?;
|
||||||
buffer.write_target_vec(&block_bloom)?;
|
buffer.write_target_array(&block_bloom)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_buffer(buffer: &mut Buffer) -> IoResult<Self> {
|
pub fn from_buffer(buffer: &mut Buffer) -> IoResult<Self> {
|
||||||
let trie_roots_before = TrieRootsTarget {
|
let trie_roots_before = TrieRootsTarget {
|
||||||
state_root: buffer.read_target_array()?,
|
state_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
transactions_root: buffer.read_target_array()?,
|
transactions_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
receipts_root: buffer.read_target_array()?,
|
receipts_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let trie_roots_after = TrieRootsTarget {
|
let trie_roots_after = TrieRootsTarget {
|
||||||
state_root: buffer.read_target_array()?,
|
state_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
transactions_root: buffer.read_target_array()?,
|
transactions_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
receipts_root: buffer.read_target_array()?,
|
receipts_root: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let block_metadata = BlockMetadataTarget {
|
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_timestamp: buffer.read_target()?,
|
||||||
block_number: buffer.read_target()?,
|
block_number: buffer.read_target()?,
|
||||||
block_difficulty: buffer.read_target()?,
|
block_difficulty: buffer.read_target()?,
|
||||||
block_gaslimit: buffer.read_target()?,
|
block_gaslimit: buffer.read_target()?,
|
||||||
block_chain_id: buffer.read_target()?,
|
block_chain_id: buffer.read_target()?,
|
||||||
block_base_fee: buffer.read_target_vec()?.try_into().unwrap(),
|
block_base_fee: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
block_bloom: buffer.read_target_vec()?.try_into().unwrap(),
|
block_bloom: buffer.read_target_array()?.try_into().unwrap(),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user