Skip to content

Commit

Permalink
polkadot-parachain simplifications and deduplications (#4916)
Browse files Browse the repository at this point in the history
`polkadot-parachain` simplifications and deduplications

Details in the commit messages. Just copy-pasting the last commit
description since it introduces the biggest changes:

```
    Implement a more structured way to define a node spec
    
    - use traits instead of bounds for `rpc_ext_builder()`,
      `build_import_queue()`, `start_consensus()`
    - add a `NodeSpec` trait for defining the specifications of a node
    - deduplicate the code related to building a node's components /
      starting a node
```

The other changes are much smaller, most of them trivial and are
isolated in separate commits.
  • Loading branch information
serban300 authored Jul 9, 2024
1 parent 1e1fd74 commit 01e0fc2
Show file tree
Hide file tree
Showing 8 changed files with 978 additions and 1,240 deletions.
7 changes: 7 additions & 0 deletions cumulus/polkadot-parachain/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

use crate::common::NodeExtraArgs;
use clap::{Command, CommandFactory, FromArgMatches};
use sc_cli::SubstrateCli;
use std::path::PathBuf;
Expand Down Expand Up @@ -94,6 +95,12 @@ pub struct Cli {
pub relay_chain_args: Vec<String>,
}

impl Cli {
pub(crate) fn node_extra_args(&self) -> NodeExtraArgs {
NodeExtraArgs { use_slot_based_consensus: self.experimental_use_slot_based }
}
}

#[derive(Debug)]
pub struct RelayChainCli {
/// The actual relay chain cli object.
Expand Down
Loading

0 comments on commit 01e0fc2

Please sign in to comment.