@@ -3,20 +3,56 @@ use std::sync::Arc;
3
3
use eth2:: types:: test_utils:: TestRandom ;
4
4
use eth2:: types:: {
5
5
Blob , BlobSidecar , BlobSidecarList , FixedVector , Hash256 , KzgCommitment , KzgProof ,
6
- MainnetEthSpec , SignedBeaconBlockHeader , Slot ,
6
+ MainnetEthSpec , SignedBeaconBlockHeader ,
7
7
} ;
8
8
use once_cell:: sync:: Lazy ;
9
9
10
- pub static ORIGIN_BLOCK : Lazy < Hash256 > = Lazy :: new ( || Hash256 :: from_slice ( & [ 9 , 9 , 9 , 9 , 9 ] ) ) ;
11
- pub static ONE : Lazy < Hash256 > = Lazy :: new ( || Hash256 :: from_slice ( & [ 1 ] ) ) ;
12
- pub static TWO : Lazy < Hash256 > = Lazy :: new ( || Hash256 :: from_slice ( & [ 2 ] ) ) ;
13
- pub static THREE : Lazy < Hash256 > = Lazy :: new ( || Hash256 :: from_slice ( & [ 3 ] ) ) ;
14
- pub static FOUR : Lazy < Hash256 > = Lazy :: new ( || Hash256 :: from_slice ( & [ 4 ] ) ) ;
15
- pub static FIVE : Lazy < Hash256 > = Lazy :: new ( || Hash256 :: from_slice ( & [ 5 ] ) ) ;
10
+ pub static ORIGIN_BLOCK : Lazy < Hash256 > = Lazy :: new ( || {
11
+ Hash256 :: from ( [
12
+ 0x09 , 0x09 , 0x09 , 0x09 , 0x09 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
13
+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
14
+ 0x00 , 0x00 ,
15
+ ] )
16
+ } ) ;
17
+ pub static ONE : Lazy < Hash256 > = Lazy :: new ( || {
18
+ Hash256 :: from ( [
19
+ 0x01 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
20
+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
21
+ 0x00 , 0x00 ,
22
+ ] )
23
+ } ) ;
24
+ pub static TWO : Lazy < Hash256 > = Lazy :: new ( || {
25
+ Hash256 :: from ( [
26
+ 0x02 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
27
+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
28
+ 0x00 , 0x00 ,
29
+ ] )
30
+ } ) ;
31
+ pub static THREE : Lazy < Hash256 > = Lazy :: new ( || {
32
+ Hash256 :: from ( [
33
+ 0x03 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
34
+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
35
+ 0x00 , 0x00 ,
36
+ ] )
37
+ } ) ;
38
+ pub static FOUR : Lazy < Hash256 > = Lazy :: new ( || {
39
+ Hash256 :: from ( [
40
+ 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
41
+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
42
+ 0x00 , 0x00 ,
43
+ ] )
44
+ } ) ;
45
+ pub static FIVE : Lazy < Hash256 > = Lazy :: new ( || {
46
+ Hash256 :: from ( [
47
+ 0x05 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
48
+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
49
+ 0x00 , 0x00 ,
50
+ ] )
51
+ } ) ;
16
52
17
- pub const START_SLOT : Slot = Slot :: new ( 10 ) ;
53
+ pub const START_SLOT : u64 = 10 ;
18
54
#[ allow( dead_code) ]
19
- pub const END_SLOT : Slot = Slot :: new ( 15 ) ;
55
+ pub const END_SLOT : u64 = 15 ;
20
56
21
57
pub fn new_blob_sidecar ( i : u64 ) -> BlobSidecar < MainnetEthSpec > {
22
58
let mut rng = rand:: thread_rng ( ) ;
0 commit comments