@@ -21,6 +21,7 @@ use crate::sync::sequential::SequentialSyncManager;
2121use crate :: types:: { ChainState , MempoolState , SpvStats } ;
2222use crate :: validation:: ValidationManager ;
2323use dashcore:: network:: constants:: NetworkExt ;
24+ use dashcore_hashes:: Hash ;
2425use key_wallet_manager:: wallet_interface:: WalletInterface ;
2526
2627use super :: { BlockProcessor , ClientConfig , DashSpvClient } ;
@@ -431,45 +432,8 @@ impl<
431432 genesis_hash
432433 ) ;
433434
434- // Create the correct genesis header using known Dash genesis block parameters
435- use dashcore:: {
436- block:: { Header as BlockHeader , Version } ,
437- pow:: CompactTarget ,
438- } ;
439- use dashcore_hashes:: Hash ;
440-
441- let genesis_header = match self . config . network {
442- dashcore:: Network :: Dash => {
443- // Use the actual Dash mainnet genesis block parameters
444- BlockHeader {
445- version : Version :: from_consensus ( 1 ) ,
446- prev_blockhash : dashcore:: BlockHash :: from ( [ 0u8 ; 32 ] ) ,
447- merkle_root : "e0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7"
448- . parse ( )
449- . unwrap_or_else ( |_| dashcore:: hashes:: sha256d:: Hash :: all_zeros ( ) . into ( ) ) ,
450- time : 1390095618 ,
451- bits : CompactTarget :: from_consensus ( 0x1e0ffff0 ) ,
452- nonce : 28917698 ,
453- }
454- }
455- dashcore:: Network :: Testnet => {
456- // Use the actual Dash testnet genesis block parameters
457- BlockHeader {
458- version : Version :: from_consensus ( 1 ) ,
459- prev_blockhash : dashcore:: BlockHash :: from ( [ 0u8 ; 32 ] ) ,
460- merkle_root : "e0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7"
461- . parse ( )
462- . unwrap_or_else ( |_| dashcore:: hashes:: sha256d:: Hash :: all_zeros ( ) . into ( ) ) ,
463- time : 1390666206 ,
464- bits : CompactTarget :: from_consensus ( 0x1e0ffff0 ) ,
465- nonce : 3861367235 ,
466- }
467- }
468- _ => {
469- // For other networks, use the existing genesis block function
470- dashcore:: blockdata:: constants:: genesis_block ( self . config . network ) . header
471- }
472- } ;
435+ let genesis_header =
436+ dashcore:: blockdata:: constants:: genesis_block ( self . config . network ) . header ;
473437
474438 // Verify the header produces the expected genesis hash
475439 let calculated_hash = genesis_header. block_hash ( ) ;
0 commit comments