merge conflicts

This commit is contained in:
mohab metwally
2022-10-15 14:23:27 +02:00
parent 3c6722d102
commit 6b83239db6
12 changed files with 351 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
use ::darkfi::{
blockchain::EpochConsensus, net::Settings, stakeholder::Stakeholder, util::time::Timestamp,
net::Settings, stakeholder::{Stakeholder, EpochConsensus},util::time::Timestamp,
};
use clap::Parser;
@@ -7,6 +7,7 @@ use futures::executor::block_on;
use std::thread;
use url::Url;
#[derive(Parser)]
struct NetCli {
#[clap(long, value_parser, default_value = "tls://127.0.0.1:12003")]
@@ -21,6 +22,7 @@ struct NetCli {
#[async_std::main]
async fn main() {
env_logger::init();
let args = NetCli::parse();
let addr = vec![Url::parse(args.addr.as_str()).unwrap()];
let mut peers = vec![];

View File

@@ -5,14 +5,15 @@ use pasta_curves::pallas;
use url::Url;
use darkfi::{
blockchain::{epoch::Epoch, EpochConsensus},
crypto::leadcoin::{LeadCoin, LEAD_PUBLIC_INPUT_LEN},
net::Settings,
stakeholder::Stakeholder,
stakeholder::{Stakeholder, epoch::{Epoch, {EpochConsensus}}},
};
fn main() {
debug!("..");
env_logger::init();
let k: u32 = 13;
//
@@ -44,9 +45,10 @@ fn main() {
let eta: pallas::Base = stakeholder.get_eta();
let mut epoch = Epoch::new(consensus, eta);
// sigma is nubmer of slots * reward (assuming reward is 1 for simplicity)
let sigma = pallas::Base::from(10);
let coins: Vec<Vec<LeadCoin>> = epoch.create_coins(sigma, vec![]);
let coins: Vec<Vec<LeadCoin>> = epoch.create_coins(sigma.clone(),
sigma,
vec![]);
let coin = coins[0][0];
let contract = coin.create_contract();