Skip to content

Commit 6a70f4e

Browse files
committed
Update doc
1 parent 2b0163f commit 6a70f4e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

book/src/validator-manager-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Validator 0x8de7ec501d574152f52a962bf588573df2fc3563fd0c6077651208ed20f24f3d8572
5555

5656
You can safely shut down the validator client at this point.
5757

58-
The following exit command will only generate the exit message and will not publish the message to the network, i.e., there will be no voluntary exit.
58+
The following command will only generate the voluntary exit message and save it to a file named `{validator_pubkey}.json`. It will not publish the message to the network, i.e., there will be no voluntary exit.
5959

60-
To only generate the exit message without publishing it to the network, use the flag `--signature`:
60+
To generate the exit message and save it to a file, use the flag `--signature`:
6161

6262
```bash
6363
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --signature

validator_manager/src/exit_validators.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use eth2::{BeaconNodeHttpClient, SensitiveUrl, Timeouts};
77
use serde::{Deserialize, Serialize};
88
use serde_json;
99
use slot_clock::{SlotClock, SystemTimeSlotClock};
10+
use std::fs::write;
1011
use std::path::PathBuf;
1112
use std::time::Duration;
1213
use types::{ChainSpec, EthSpec, PublicKeyBytes};
@@ -209,7 +210,7 @@ async fn run<E: EthSpec>(config: ExitConfig) -> Result<(), String> {
209210
exit_message_all.push(json.clone());
210211
} else {
211212
let file_path = format!("{}.json", validator_to_exit);
212-
std::fs::write(&file_path, json).map_err(|e| {
213+
write(&file_path, json).map_err(|e| {
213214
format!("Failed to write voluntary exit message to file: {}", e)
214215
})?;
215216
println!("Voluntary exit message saved to {}", file_path);
@@ -361,7 +362,7 @@ async fn run<E: EthSpec>(config: ExitConfig) -> Result<(), String> {
361362
if merge {
362363
let all_json = serde_json::to_string(&exit_message_all)
363364
.map_err(|e| format!("Failed to serialize voluntary exit message: {}", e))?;
364-
std::fs::write("all_validators.json", all_json)
365+
write("all_validators.json", all_json)
365366
.map_err(|e| format!("Failed to write all voluntary exit messages to file: {}", e))?;
366367
println!("All voluntary exit messages save to all_validators.json.")
367368
}

0 commit comments

Comments
 (0)