fix: retry transactions on AccountInUse errors

This commit is contained in:
Michael Vines
2018-10-23 13:10:08 -07:00
parent 96c685eb5d
commit 90c9df15ef
3 changed files with 38 additions and 24 deletions

View File

@ -101,10 +101,11 @@ const ConfirmTransactionRpcResult = jsonRpcResult('boolean');
* Expected JSON RPC response for the "getSignatureStatus" message
*/
const GetSignatureStatusRpcResult = jsonRpcResult(struct.enum([
'AccountInUse',
'Confirmed',
'SignatureNotFound',
'ProgramRuntimeError',
'GenericFailure',
'ProgramRuntimeError',
'SignatureNotFound',
]));
/**
@ -152,7 +153,11 @@ type AccountInfo = {
*
* @typedef {string} SignatureStatus
*/
export type SignatureStatus = 'Confirmed' | 'SignatureNotFound' | 'ProgramRuntimeError' | 'GenericFailure';
export type SignatureStatus = 'Confirmed'
| 'AccountInUse'
| 'SignatureNotFound'
| 'ProgramRuntimeError'
| 'GenericFailure';
/**
* A connection to a fullnode JSON RPC endpoint