mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
parent
b5fe22dbd5
commit
dd90aaedbc
3 changed files with 5 additions and 15 deletions
|
@ -59,7 +59,7 @@ pub const TESTING_INITIAL_DIFFICULTY: u64 = 1;
|
||||||
/// Testnet 2 initial block difficulty, high to see how it goes
|
/// Testnet 2 initial block difficulty, high to see how it goes
|
||||||
pub const TESTNET2_INITIAL_DIFFICULTY: u64 = 1000;
|
pub const TESTNET2_INITIAL_DIFFICULTY: u64 = 1000;
|
||||||
|
|
||||||
/// Testnet 2 initial block difficulty, moderatly hight, taking into account
|
/// Testnet 2 initial block difficulty, moderately hight, taking into account
|
||||||
/// a 30x Cuckoo adjustment factor
|
/// a 30x Cuckoo adjustment factor
|
||||||
pub const TESTNET3_INITIAL_DIFFICULTY: u64 = 15000;
|
pub const TESTNET3_INITIAL_DIFFICULTY: u64 = 15000;
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ pub enum ChainTypes {
|
||||||
Testnet1,
|
Testnet1,
|
||||||
/// Second test network
|
/// Second test network
|
||||||
Testnet2,
|
Testnet2,
|
||||||
/// Thirs test network
|
/// Third test network
|
||||||
Testnet3,
|
Testnet3,
|
||||||
/// Main production network
|
/// Main production network
|
||||||
Mainnet,
|
Mainnet,
|
||||||
|
|
|
@ -13,10 +13,7 @@
|
||||||
|
|
||||||
//! Implementation of the persistent Backend for the prunable MMR tree.
|
//! Implementation of the persistent Backend for the prunable MMR tree.
|
||||||
|
|
||||||
use std::fs;
|
use std::{fs, io, marker};
|
||||||
use std::io;
|
|
||||||
use std::marker;
|
|
||||||
use std::path::Path;
|
|
||||||
|
|
||||||
use croaring::Bitmap;
|
use croaring::Bitmap;
|
||||||
|
|
||||||
|
@ -26,8 +23,7 @@ use core::core::BlockHeader;
|
||||||
use core::ser::{self, PMMRable};
|
use core::ser::{self, PMMRable};
|
||||||
use leaf_set::LeafSet;
|
use leaf_set::LeafSet;
|
||||||
use prune_list::PruneList;
|
use prune_list::PruneList;
|
||||||
use rm_log::RemoveLog;
|
use types::{prune_noop, AppendOnlyFile};
|
||||||
use types::{prune_noop, read_ordered_vec, AppendOnlyFile};
|
|
||||||
use util::LOGGER;
|
use util::LOGGER;
|
||||||
|
|
||||||
const PMMR_HASH_FILE: &'static str = "pmmr_hash.bin";
|
const PMMR_HASH_FILE: &'static str = "pmmr_hash.bin";
|
||||||
|
@ -35,12 +31,6 @@ const PMMR_DATA_FILE: &'static str = "pmmr_data.bin";
|
||||||
const PMMR_LEAF_FILE: &'static str = "pmmr_leaf.bin";
|
const PMMR_LEAF_FILE: &'static str = "pmmr_leaf.bin";
|
||||||
const PMMR_PRUN_FILE: &'static str = "pmmr_prun.bin";
|
const PMMR_PRUN_FILE: &'static str = "pmmr_prun.bin";
|
||||||
|
|
||||||
// TODO - we can get rid of these for testnet3 (only used for migration during
|
|
||||||
// testnet2). "Legacy" rm_log.bin and pruned.bin files (used when migrating
|
|
||||||
// existing node).
|
|
||||||
const LEGACY_RM_LOG_FILE: &'static str = "pmmr_rm_log.bin";
|
|
||||||
const LEGACY_PRUNED_FILE: &'static str = "pmmr_pruned.bin";
|
|
||||||
|
|
||||||
/// PMMR persistent backend implementation. Relies on multiple facilities to
|
/// PMMR persistent backend implementation. Relies on multiple facilities to
|
||||||
/// handle writing, reading and pruning.
|
/// handle writing, reading and pruning.
|
||||||
///
|
///
|
||||||
|
|
|
@ -19,7 +19,7 @@ use libtx::proof;
|
||||||
use libwallet::Error;
|
use libwallet::Error;
|
||||||
use libwallet::types::*;
|
use libwallet::types::*;
|
||||||
use util::secp::{pedersen, key::SecretKey};
|
use util::secp::{pedersen, key::SecretKey};
|
||||||
use util::{self, LOGGER};
|
use util::LOGGER;
|
||||||
|
|
||||||
/// Utility struct for return values from below
|
/// Utility struct for return values from below
|
||||||
struct OutputResult {
|
struct OutputResult {
|
||||||
|
|
Loading…
Reference in a new issue