new constructor that takes AccountProvider

This commit is contained in:
keorn 2016-09-14 17:29:35 +02:00
parent bb59c2288e
commit d3ec8588c4

View File

@ -217,6 +217,11 @@ impl Miner {
} }
} }
/// Creates new instance of miner with accounts and with given spec.
pub fn with_spec_and_accounts(spec: &Spec, accounts: Option<Arc<AccountProvider>>) -> Miner {
Miner::new_raw(Default::default(), GasPricer::new_fixed(20_000_000_000u64.into()), spec, accounts)
}
/// Creates new instance of miner without accounts, but with given spec. /// Creates new instance of miner without accounts, but with given spec.
pub fn with_spec(spec: &Spec) -> Miner { pub fn with_spec(spec: &Spec) -> Miner {
Miner::new_raw(Default::default(), GasPricer::new_fixed(20_000_000_000u64.into()), spec, None) Miner::new_raw(Default::default(), GasPricer::new_fixed(20_000_000_000u64.into()), spec, None)