Skip to content

Commit

Permalink
chore: rm duplicated code (paradigmxyz#7147)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored and Ruteri committed Apr 17, 2024
1 parent 4445cf7 commit 0bfc4b2
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions crates/node-core/src/node_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,25 +204,9 @@ pub struct NodeConfig {
impl NodeConfig {
/// Creates a testing [NodeConfig], causing the database to be launched ephemerally.
pub fn test() -> Self {
let mut test = Self {
config: None,
chain: MAINNET.clone(),
metrics: None,
instance: 1,
trusted_setup_file: None,
network: NetworkArgs::default(),
rpc: RpcServerArgs::default(),
txpool: TxPoolArgs::default(),
builder: PayloadBuilderArgs::default(),
debug: DebugArgs::default(),
db: DatabaseArgs::default(),
dev: DevArgs::default(),
pruning: PruningArgs::default(),
};

// set all ports to zero by default for test instances
test = test.with_unused_ports();
test
Self::default()
// set all ports to zero by default for test instances
.with_unused_ports()
}

/// Sets --dev mode for the node
Expand Down

0 comments on commit 0bfc4b2

Please sign in to comment.