fix proposal budget increase (#1645)

This commit is contained in:
agrippa 2023-05-30 20:56:07 -04:00 committed by GitHub
parent 8c1fc5c0a4
commit b30fa84f29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -25,9 +25,6 @@ export const executeInstructions = async (
) => {
const instructions: TransactionInstruction[] = []
instructions.push(
ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000 })
)
await Promise.all(
proposalInstructions.map((instruction) =>
// withExecuteTransaction function mutate the given 'instructions' parameter
@ -44,9 +41,13 @@ export const executeInstructions = async (
)
if (multiTransactionMode) {
const txes = [...instructions.map((x) => [x])].map((txBatch, batchIdx) => {
const batchWithComputeBudget = [
ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000 }),
...txBatch,
]
return {
instructionsSet: txBatchesToInstructionSetWithSigners(
txBatch,
batchWithComputeBudget,
[],
batchIdx
),