feat: add getSlotLeader()/getClusterNodes()

This commit is contained in:
Michael Vines
2019-04-23 09:53:26 -07:00
parent 5f2bcd5200
commit a2cd9180b5
8 changed files with 177 additions and 43 deletions

View File

@@ -41,5 +41,7 @@ export async function sendAndConfirmRawTransaction(
return signature;
}
throw new Error(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);
throw new Error(
`Raw transaction ${signature} failed (${JSON.stringify(status)})`,
);
}

View File

@@ -52,7 +52,9 @@ export async function sendAndConfirmTransaction(
}
if (status && status.Err && !('AccountInUse' in status.Err)) {
throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);
throw new Error(
`Transaction ${signature} failed (${JSON.stringify(status)})`,
);
}
// Retry in 0..100ms to try to avoid another AccountInUse collision