Skip to content

Commit

Permalink
Default to SYNCING response
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Aug 9, 2023
1 parent 77eb06b commit 5608271
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lcli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,9 @@ fn main() {
Arg::with_name("all-payloads-valid")
.long("all-payloads-valid")
.takes_value(true)
.help("When set to true, the server will indicate that all payloads are \
valid.")
.default_value("true")
.help("Controls the response to newPayload and forkchoiceUpdated. \
Set to 'true' to return VALID. Set to 'false' to return SYNCING.")
.default_value("false")
)
.arg(
Arg::with_name("shanghai-time")
Expand Down
4 changes: 4 additions & 0 deletions lcli/src/mock_el.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ pub fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<
let server: MockServer<T> = MockServer::new_with_config(&handle, config);

if all_payloads_valid {
eprintln!(
"Using --all-payloads-valid=true can be dangerous. \
Never use this flag when operating validators."
);
// Indicate that all payloads are valid.
server.all_payloads_valid();
}
Expand Down

0 comments on commit 5608271

Please sign in to comment.