fix: update accounts to readonly/writable
This commit is contained in:
committed by
Michael Vines
parent
58550733fb
commit
d0c89f7fa3
@ -36,7 +36,7 @@ test('load BPF C program', async () => {
|
||||
|
||||
const programId = await BpfLoader.load(connection, from, data);
|
||||
const transaction = new Transaction().add({
|
||||
keys: [{pubkey: from.publicKey, isSigner: true, isDebitable: true}],
|
||||
keys: [{pubkey: from.publicKey, isSigner: true, isWritable: true}],
|
||||
programId,
|
||||
});
|
||||
await sendAndConfirmTransaction(connection, transaction, from);
|
||||
@ -61,7 +61,7 @@ test('load BPF Rust program', async () => {
|
||||
|
||||
const programId = await BpfLoader.load(connection, from, data);
|
||||
const transaction = new Transaction().add({
|
||||
keys: [{pubkey: from.publicKey, isSigner: true, isDebitable: true}],
|
||||
keys: [{pubkey: from.publicKey, isSigner: true, isWritable: true}],
|
||||
programId,
|
||||
});
|
||||
await sendAndConfirmTransaction(connection, transaction, from);
|
||||
|
@ -681,11 +681,6 @@ test('transaction', async () => {
|
||||
result: 31,
|
||||
},
|
||||
]);
|
||||
if (!mockRpcEnabled) {
|
||||
// Credit-only account credits are committed at the end of every slot;
|
||||
// this sleep is to ensure a full slot has elapsed
|
||||
await sleep((1000 * DEFAULT_TICKS_PER_SLOT) / NUM_TICKS_PER_SECOND);
|
||||
}
|
||||
expect(await connection.getBalance(accountTo.publicKey)).toBe(31);
|
||||
});
|
||||
|
||||
|
@ -111,8 +111,8 @@ test('non-SystemInstruction error', () => {
|
||||
|
||||
const badProgramId = {
|
||||
keys: [
|
||||
{pubkey: from.publicKey, isSigner: true, isDebitable: true},
|
||||
{pubkey: to.publicKey, isSigner: false, isDebitable: false},
|
||||
{pubkey: from.publicKey, isSigner: true, isWritable: true},
|
||||
{pubkey: to.publicKey, isSigner: false, isWritable: true},
|
||||
],
|
||||
programId: BudgetProgram.programId,
|
||||
data: Buffer.from([2, 0, 0, 0]),
|
||||
|
Reference in New Issue
Block a user