Skip to content

Commit

Permalink
fixed formatting with cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
philmartin2525 committed Jan 21, 2022
1 parent 80f57e1 commit 0617fcc
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions chain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ static CHAIN_PARAMS_TESTNET: Lazy<ChainParams> = Lazy::new(|| {
ChainParams {
name: "testnet".to_string(),
p2p_magic: P2pNetworkId::Testnet,
genesis_hash: BlockHash::from_slice(GENESIS_HASH_TESTNET)
.expect("Bitcoin testnet genesis hash contains invalid binary data"),
genesis_hash: BlockHash::from_slice(GENESIS_HASH_TESTNET).expect(
"Bitcoin testnet genesis hash contains invalid binary data",
),
bip70_name: "test".to_string(),
bip173_prefix: "tb".to_string(),
p2p_port: 18333,
Expand All @@ -331,8 +332,9 @@ static CHAIN_PARAMS_TESTNET: Lazy<ChainParams> = Lazy::new(|| {
unit_of_accounting: "Test Bitcoin".to_string(),
indivisible_unit: "Test satoshi".to_string(),
divisibility: 100_000_000,
asset_id: AssetId::from_slice(GENESIS_HASH_TESTNET)
.expect("Bitcoin testnet genesis hash contains invalid binary data"),
asset_id: AssetId::from_slice(GENESIS_HASH_TESTNET).expect(
"Bitcoin testnet genesis hash contains invalid binary data",
),
asset_system: AssetSystem::NativeBlockchain,
},
is_testnet: true,
Expand All @@ -341,68 +343,66 @@ static CHAIN_PARAMS_TESTNET: Lazy<ChainParams> = Lazy::new(|| {
});

/// Bitcoin regtest chain parameters
static CHAIN_PARAMS_REGTEST: Lazy<ChainParams> = Lazy::new(|| {
ChainParams {
name: "regtest".to_string(),
p2p_magic: P2pNetworkId::Regtest,
genesis_hash: BlockHash::from_slice(GENESIS_HASH_REGTEST)
.expect("Bitcoin regtest genesis hash contains invalid binary data"),
bip70_name: "regtest".to_string(),
bip173_prefix: "tb".to_string(),
p2p_port: 28333,
rpc_port: 28332,
ln_height: 1,
rgb_height: 1,
format: ChainFormat::Bitcoin,
dust_limit: 546,
native_asset: AssetParams {
ticker: "tBTC".to_string(),
unit_of_accounting: "Test Bitcoin".to_string(),
indivisible_unit: "Test satoshi".to_string(),
divisibility: 100_000_000,
asset_id: AssetId::from_slice(GENESIS_HASH_REGTEST)
.expect("Bitcoin regtest genesis hash contains invalid binary data"),
asset_system: AssetSystem::NativeBlockchain,
},
is_testnet: true,
is_pow: false,
}
static CHAIN_PARAMS_REGTEST: Lazy<ChainParams> = Lazy::new(|| ChainParams {
name: "regtest".to_string(),
p2p_magic: P2pNetworkId::Regtest,
genesis_hash: BlockHash::from_slice(GENESIS_HASH_REGTEST)
.expect("Bitcoin regtest genesis hash contains invalid binary data"),
bip70_name: "regtest".to_string(),
bip173_prefix: "tb".to_string(),
p2p_port: 28333,
rpc_port: 28332,
ln_height: 1,
rgb_height: 1,
format: ChainFormat::Bitcoin,
dust_limit: 546,
native_asset: AssetParams {
ticker: "tBTC".to_string(),
unit_of_accounting: "Test Bitcoin".to_string(),
indivisible_unit: "Test satoshi".to_string(),
divisibility: 100_000_000,
asset_id: AssetId::from_slice(GENESIS_HASH_REGTEST).expect(
"Bitcoin regtest genesis hash contains invalid binary data",
),
asset_system: AssetSystem::NativeBlockchain,
},
is_testnet: true,
is_pow: false,
});

/// Bitcoin signet chain parameters
static CHAIN_PARAMS_SIGNET: Lazy<ChainParams> = Lazy::new(|| {
ChainParams {
name: "signet".to_string(),
p2p_magic: P2pNetworkId::Signet,
genesis_hash: BlockHash::from_slice(GENESIS_HASH_SIGNET)
static CHAIN_PARAMS_SIGNET: Lazy<ChainParams> = Lazy::new(|| ChainParams {
name: "signet".to_string(),
p2p_magic: P2pNetworkId::Signet,
genesis_hash: BlockHash::from_slice(GENESIS_HASH_SIGNET)
.expect("Bitcoin signet genesis hash contains invalid binary data"),
bip70_name: "signet".to_string(),
bip173_prefix: "tb".to_string(),
p2p_port: 38333,
rpc_port: 38332,
ln_height: 1,
rgb_height: 1,
format: ChainFormat::Bitcoin,
dust_limit: 546,
native_asset: AssetParams {
ticker: "sBTC".to_string(),
unit_of_accounting: "Signet Bitcoin".to_string(),
indivisible_unit: "Signet satoshi".to_string(),
divisibility: 100_000_000,
asset_id: AssetId::from_slice(GENESIS_HASH_SIGNET)
.expect("Bitcoin signet genesis hash contains invalid binary data"),
bip70_name: "signet".to_string(),
bip173_prefix: "tb".to_string(),
p2p_port: 38333,
rpc_port: 38332,
ln_height: 1,
rgb_height: 1,
format: ChainFormat::Bitcoin,
dust_limit: 546,
native_asset: AssetParams {
ticker: "sBTC".to_string(),
unit_of_accounting: "Signet Bitcoin".to_string(),
indivisible_unit: "Signet satoshi".to_string(),
divisibility: 100_000_000,
asset_id: AssetId::from_slice(GENESIS_HASH_SIGNET)
.expect("Bitcoin signet genesis hash contains invalid binary data"),
asset_system: AssetSystem::NativeBlockchain,
},
is_testnet: true,
is_pow: false,
}
asset_system: AssetSystem::NativeBlockchain,
},
is_testnet: true,
is_pow: false,
});

/// Liquid V1 chain parameters
static CHAIN_PARAMS_LIQUIDV1: Lazy<ChainParams> = Lazy::new(|| {
ChainParams {
name: "liquidv1".to_string(),
// TODO #216: check Liquid network magic number and change this if needed
// TODO #216: check Liquid network magic number and change this if
// needed
p2p_magic: P2pNetworkId::Mainnet,
genesis_hash: BlockHash::from_slice(GENESIS_HASH_LIQUIDV1)
.expect("Liquid V1 genesis hash contains invalid binary data"),
Expand Down

0 comments on commit 0617fcc

Please sign in to comment.