-
Notifications
You must be signed in to change notification settings - Fork 29
Allow to override chainstate options for regtest #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bd452bd
Add a separate run command
stanislav-tkach 71fb83f
Add chain-config options to the node parameters
stanislav-tkach 4176039
Override chainstate options
stanislav-tkach 71f75e9
Use regtest for functional tests
stanislav-tkach 7ac7925
Remove strum dependency
stanislav-tkach 8a7784a
Use a macro for overriding the chain config options
stanislav-tkach da5cdd8
Fix functional tests
stanislav-tkach 39b583e
Add the map_err macro arm
stanislav-tkach cba548d
Delegate the first branch to the second one
stanislav-tkach 80d6677
Remove coin decimals from options
stanislav-tkach 2db2ee6
Restore the coin_decimals option
stanislav-tkach 7d47b74
Add testnet
stanislav-tkach 20f0fc9
Move regtest options to a separate file
stanislav-tkach 56e54da
Add emission_schedule to regtest options
stanislav-tkach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
|
||
mod config; | ||
mod options; | ||
mod regtest_options; | ||
mod runner; | ||
|
||
pub type Error = anyhow::Error; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Copyright (c) 2022 RBB S.r.l | ||
// [email protected] | ||
// SPDX-License-Identifier: MIT | ||
// Licensed under the MIT License; | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://spdx.org/licenses/MIT | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
use clap::Args; | ||
|
||
use crate::RunOptions; | ||
|
||
#[derive(Args, Debug)] | ||
pub struct RegtestOptions { | ||
#[clap(flatten)] | ||
pub run_options: RunOptions, | ||
#[clap(flatten)] | ||
pub chain_config: ChainConfigOptions, | ||
} | ||
|
||
#[derive(Args, Debug)] | ||
pub struct ChainConfigOptions { | ||
/// Address prefix. | ||
#[clap(long)] | ||
pub chain_address_prefix: Option<String>, | ||
|
||
/// Block reward maturity. | ||
#[clap(long)] | ||
pub chain_blockreward_maturity: Option<i64>, | ||
|
||
/// The maximum future block offset in seconds. | ||
#[clap(long)] | ||
pub chain_max_future_block_time_offset: Option<u64>, | ||
|
||
/// The chain version (major.minor.path). | ||
#[clap(long)] | ||
pub chain_version: Option<String>, | ||
|
||
/// Target block spacing in seconds. | ||
#[clap(long)] | ||
pub chain_target_block_spacing: Option<u64>, | ||
|
||
/// Coin decimals. | ||
#[clap(long)] | ||
pub chain_coin_decimals: Option<u8>, | ||
|
||
/// Emission schedule (`<initial_supply>+<initial_subsidy>[, <height>+<subsidy>]`). | ||
pub chain_emission_schedule: Option<String>, | ||
|
||
/// The maximum block header size in bytes. | ||
#[clap(long)] | ||
pub chain_max_block_header_size: Option<usize>, | ||
|
||
/// The maximum transactions size in block in bytes. | ||
#[clap(long)] | ||
pub chain_max_block_size_with_standard_txs: Option<usize>, | ||
|
||
/// The maximum smart contracts size ib block in bytes. | ||
#[clap(long)] | ||
pub chain_max_block_size_with_smart_contracts: Option<usize>, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.