Skip to content

Commit

Permalink
revert: Anvil builder default port
Browse files Browse the repository at this point in the history
  • Loading branch information
MistApproach committed Aug 31, 2024
1 parent 3e3c625 commit 1da0b9b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/node-bindings/src/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl Anvil {
pub fn try_spawn(self) -> Result<AnvilInstance, AnvilError> {
let mut cmd = self.program.as_ref().map_or_else(|| Command::new("anvil"), Command::new);
cmd.stdout(std::process::Stdio::piped()).stderr(std::process::Stdio::inherit());
let mut port = self.port.unwrap_or(8545u16);
let mut port = self.port.unwrap_or_default();
cmd.arg("-p").arg(port.to_string());

if let Some(mnemonic) = self.mnemonic {
Expand Down Expand Up @@ -417,10 +417,4 @@ mod tests {
let anvil = Anvil::new().spawn();
assert_eq!(anvil.chain_id(), 31337);
}

#[test]
fn assert_default_port() {
let anvil = Anvil::new().spawn();
assert_eq!(anvil.port(), 8545);
}
}

0 comments on commit 1da0b9b

Please sign in to comment.