Skip to content

Commit

Permalink
ADD: Release Fixes (#2097)
Browse files Browse the repository at this point in the history
* FIX: beaconcha button directing to validator page

* FIX: Valdiator Exit Process
  • Loading branch information
NeoPlays authored Oct 17, 2024
1 parent b877260 commit 39ec976
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 4 additions & 2 deletions launcher/src/backend/Monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -3166,7 +3166,7 @@ rm -rf diskoutput
}

try {
const beaconAPIPort = beaconStatus.data[0].beacon.destinationPort;
const beaconAPIPort = beaconStatus.data[0].beacon.servicePort;
const serviceId = beaconStatus.data[0].sid;
if (!Array.isArray(pubkey)) {
pubkey = [pubkey];
Expand All @@ -3177,7 +3177,7 @@ rm -rf diskoutput
if (!output.includes("{") || !output.includes("}")) {
return {
pubkey: pubkey,
code: null,
code: /20[0-8] OK/.test(output) ? 200 : null,
msg: output,
};
}
Expand Down Expand Up @@ -3223,6 +3223,8 @@ rm -rf diskoutput
if (SSHService.checkExecError(runExitCommand) && runExitCommand.stderr) {
throw new Error(SSHService.extractExecError(runExitCommand));
}
if (!runExitCommand.stdout)
throw `ReturnCode: ${runExitCommand.rc}\nStderr: ${runExitCommand.stderr}\nStdout: ${runExitCommand.stdout}\nIs Your Consensus Client Running?`;

const response = parseRunExitCommandOutput(runExitCommand.stdout, pubkey);

Expand Down
14 changes: 14 additions & 0 deletions launcher/src/backend/ValidatorAccountManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ export class ValidatorAccountManager {

//Error handling
if (SSHService.checkExecError(result) && result.stderr) throw SSHService.extractExecError(result);
if (!result.stdout)
throw `ReturnCode: ${result.rc}\nStderr: ${result.stderr}\nStdout: ${result.stdout}\nIs Your Consensus Client Running?`;

const data = JSON.parse(result.stdout);
if (data.data === undefined) {
if (data.code === undefined || data.message === undefined) {
Expand Down Expand Up @@ -703,7 +706,18 @@ export class ValidatorAccountManager {

this.nodeConnection.taskManager.otherTasksHandler(ref, `Get Remote Keys`, true, result.stdout);

//Error handling
if (SSHService.checkExecError(result) && result.stderr) throw SSHService.extractExecError(result);
if (!result.stdout)
throw `ReturnCode: ${result.rc}\nStderr: ${result.stderr}\nStdout: ${result.stdout}\nIs Your Consensus Client Running?`;

const data = JSON.parse(result.stdout);
if (data.data === undefined) {
if (data.code === undefined || data.message === undefined) {
throw "Undexpected Error: " + result;
}
throw data.code + " " + data.message;
}
if (!data.data) data.data = [];

this.nodeConnection.taskManager.otherTasksHandler(ref);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const navToBeaconcha = (network) => {
holesky: "https://holesky.beaconcha.in/",
};
const url = urls[network];
const url = urls[network] + "validator/" + props.item.key;
if (url) {
window.open(url, "_blank");
} else {
Expand Down

0 comments on commit 39ec976

Please sign in to comment.