File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const ACCESSES: usize = 64;
3030
3131pub const EPOCH_LENGTH : usize = 30000 ;
3232
33+ /// Get the cache size required given the block number.
3334pub fn get_cache_size ( block_number : U256 ) -> usize {
3435 let block_number = block_number. as_usize ( ) ;
3536
@@ -41,6 +42,7 @@ pub fn get_cache_size(block_number: U256) -> usize {
4142 sz
4243}
4344
45+ /// Get the full dataset size given the block number.
4446pub fn get_full_size ( block_number : U256 ) -> usize {
4547 let block_number = block_number. as_usize ( ) ;
4648
@@ -139,6 +141,7 @@ fn u8s_to_u32(a: &[u8]) -> u32 {
139141 ( a[ 2 ] as u32 ) << 16 + ( a[ 3 ] as u32 ) << 24
140142}
141143
144+ /// Calculate the dataset item.
142145pub fn calc_dataset_item ( cache : & [ u8 ] , i : usize ) -> H512 {
143146 debug_assert ! ( cache. len( ) % 64 == 0 ) ;
144147
You can’t perform that action at this time.
0 commit comments