feat: add skipPreflight option

This commit is contained in:
Justin Starry
2020-06-03 19:55:42 +08:00
committed by Michael Vines
parent a6e07e44da
commit 8547ae43ce
12 changed files with 263 additions and 68 deletions

View File

@ -69,7 +69,10 @@ export class Loader {
connection,
transaction,
[payer, program],
1,
{
confirmations: 1,
skipPreflight: true,
},
);
}
@ -107,7 +110,10 @@ export class Loader {
data,
});
transactions.push(
sendAndConfirmTransaction(connection, transaction, [payer, program], 1),
sendAndConfirmTransaction(connection, transaction, [payer, program], {
confirmations: 1,
skipPreflight: true,
}),
);
// Delay ~1 tick between write transactions in an attempt to reduce AccountInUse errors
@ -152,7 +158,10 @@ export class Loader {
connection,
transaction,
[payer, program],
1,
{
confirmations: 1,
skipPreflight: true,
},
);
}
}