Przeglądaj źródła

darkfid: integrated latest changes

skoupidi 2 lat temu
rodzic
commit
b30c20379c

+ 0 - 9
bin/darkfid/darkfid_config.toml

@@ -29,9 +29,6 @@ pow_target = 10
 # Optional fixed PoW difficulty, used for testing
 pow_fixed_difficulty = 1
 
-# Whitelisted faucet addresses
-faucet_pub = []
-
 # Participate in the consensus protocol
 consensus = true
 
@@ -161,9 +158,6 @@ minerd_endpoint = "tcp://127.0.0.1:28467"
 # PoW block production target, in seconds
 pow_target = 90
 
-# Whitelisted faucet addresses
-faucet_pub = ["3ce5xa3PjuQGFtTaF7AvMJp7fGxqeGRJx7zj3LCwNCkP"]
-
 # Participate in the consensus protocol
 consensus = false
 
@@ -311,9 +305,6 @@ minerd_endpoint = "tcp://127.0.0.1:28467"
 # PoW block production target, in seconds
 pow_target = 90
 
-# Whitelisted faucet addresses
-faucet_pub = []
-
 # Participate in the consensus protocol
 consensus = false
 

+ 0 - 4
bin/darkfid/src/main.rs

@@ -126,10 +126,6 @@ pub struct BlockchainNetwork {
     /// Optional fixed PoW difficulty, used for testing
     pub pow_fixed_difficulty: Option<usize>,
 
-    #[structopt(long)]
-    /// Whitelisted faucet public key (repeatable flag)
-    pub faucet_pub: Vec<String>,
-
     #[structopt(long)]
     /// Participate in the consensus protocol
     pub consensus: bool,

+ 3 - 3
bin/darkfid/src/tests/harness.rs

@@ -70,8 +70,8 @@ impl Harness {
         ex: &Arc<smol::Executor<'static>>,
     ) -> Result<Self> {
         // Use test harness to generate genesis transactions
-        let mut th = TestHarness::new(&["money".to_string()], verify_fees).await?;
-        let (genesis_mint_tx, _) = th.genesis_mint(&Holder::Bob, config.bob_initial)?;
+        let mut th = TestHarness::new(&[Holder::Bob], verify_fees).await?;
+        let (genesis_mint_tx, _) = th.genesis_mint(&Holder::Bob, config.bob_initial).await?;
 
         // Generate default genesis block
         let mut genesis_block = BlockInfo::default();
@@ -94,7 +94,7 @@ impl Harness {
         };
 
         // Generate validators using pregenerated vks
-        let (_, vks) = vks::read_or_gen_vks_and_pks()?;
+        let (_, vks) = vks::get_cached_pks_and_vks()?;
         let mut sync_settings =
             Settings { localnet: true, inbound_connections: 3, ..Default::default() };
         let mut consensus_settings =

+ 1 - 1
bin/darkfid/src/tests/mod.rs

@@ -42,7 +42,7 @@ async fn sync_blocks_real(ex: Arc<Executor<'static>>) -> Result<()> {
         alice_initial: 1000,
         bob_initial: 500,
     };
-    let th = Harness::new(config, false, &ex).await?;
+    let th = Harness::new(config, true, &ex).await?;
 
     // Retrieve genesis block
     let previous = th.alice.validator.blockchain.last_block()?;