async function rpcCallResultSync(cmd, paramsUsed) {
    let status = "error";
    let isOK = false;
    let respCore;
    let outputLast;

    respCore = await rpcCallCoreSync(cmd, paramsUsed);

    if (respCore.status === "error") {
        outputLast = respCore.output;
        status = "error";
    } else {
        outputLast = (respCore.output.result);
        status = "ok";
        isOK = true;
    }

    return {output: outputLast, status: status, isOK: isOK}
}
// rpcCallResultSync and rpcCallCoreSync can be combined, but it is more clear to keep them like this
rpcCallResultSync and rpcCallCoreSync can be combined, but it is more clear to keep them like this
rpcCallResultSync and rpcCallCoreSync can be combined but it is more clear to keep them like this
async function rpcCallResultSync(cmd, paramsUsed) {
    let status = "error";
    let isOK = false;
    let respCore;
    let outputLast;
    respCore = await rpcCallCoreSync(cmd, paramsUsed);
    if (respCore.status === "error") {
        outputLast = respCore.output;
        status = "error";
    } else {
        outputLast = (respCore.output.result);
        status = "ok";
        isOK = true;
    }
    return {output: outputLast, status: status, isOK: isOK}
}
async function rpcCallResultSync ( cmd , paramsUsed ) { let status = "error" ; let isOK = false ; let respCore ; let outputLast ; respCore = await rpcCallCoreSync ( cmd , paramsUsed ) ; if ( respCore . status === "error" ) { outputLast = respCore . output ; status = "error" ; } else { outputLast = ( respCore . output . result ) ; status = "ok" ; isOK = true ; } return { output : outputLast , status : status , isOK : isOK } }
rpcCallResultSync and rpcCallCoreSync can be combined, but it is more clear to keep them like this
rpcCallResultSync and rpcCallCoreSync can be combined but it is more clear to keep them like this