File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ static STORAGE: once_cell::sync::Lazy<
7
7
#[ test]
8
8
fn test_bitcoin_genesis ( ) {
9
9
let genesis = STORAGE . lock ( ) . unwrap ( ) . get_block ( 0 ) . unwrap ( ) ;
10
+ assert_eq ! (
11
+ genesis,
12
+ bitcoin:: blockdata:: constants:: genesis_block( bitcoin:: network:: constants:: Network :: Bitcoin )
13
+ ) ;
10
14
11
15
assert_eq ! ( 285 , genesis. size( ) ) ;
12
16
Original file line number Diff line number Diff line change @@ -6,14 +6,13 @@ static STORAGE: once_cell::sync::Lazy<
6
6
7
7
#[ test]
8
8
fn test_blockdata_parsing ( ) {
9
+ let genesis = STORAGE . lock ( ) . unwrap ( ) . get_block ( 0 ) . unwrap ( ) ;
9
10
assert_eq ! (
10
- STORAGE
11
- . lock( )
12
- . unwrap( )
13
- . get_block( 0 )
14
- . unwrap( )
15
- . block_hash( )
16
- . to_string( ) ,
11
+ genesis,
12
+ bitcoin:: blockdata:: constants:: genesis_block( bitcoin:: network:: constants:: Network :: Testnet )
13
+ ) ;
14
+ assert_eq ! (
15
+ genesis. block_hash( ) . to_string( ) ,
17
16
"000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
18
17
) ;
19
18
for height in 0 ..=120 {
You can’t perform that action at this time.
0 commit comments