*Add rpc ready call to consensusHandler and executionHandler to ensure we have a relay before continuing

This commit is contained in:
Derrick Hammer 2023-03-29 17:07:25 -04:00
parent 62c6950957
commit a03ae542b1
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 0 deletions

View File

@ -65,6 +65,11 @@ async function handleRpcMethod(aq: ActiveQuery) {
} }
async function consensusHandler(method: string, data: any) { async function consensusHandler(method: string, data: any) {
// @ts-ignore
await (
await rpc.ready
)();
while (true) { while (true) {
let query = await rpc.simpleQuery({ let query = await rpc.simpleQuery({
query: { query: {
@ -87,6 +92,10 @@ async function consensusHandler(method: string, data: any) {
} }
async function executionHandler(data: Map<string, string | any>) { async function executionHandler(data: Map<string, string | any>) {
// @ts-ignore
await (
await rpc.ready
)();
while (true) { while (true) {
let query = await rpc.simpleQuery({ let query = await rpc.simpleQuery({
query: { query: {