fix: Add preliminary handling for credit-only account designation

This commit is contained in:
Tyera Eulberg
2019-05-23 18:24:38 -06:00
committed by Michael Vines
parent 78ad376bcd
commit c99d8dd15c
9 changed files with 156 additions and 110 deletions

View File

@ -28,7 +28,7 @@ test('load BPF C program', async () => {
const data = await fs.readFile('test/fixtures/noop-c/noop.so');
const programId = await BpfLoader.load(connection, from, data);
const transaction = new Transaction().add({
keys: [{pubkey: from.publicKey, isSigner: true}],
keys: [{pubkey: from.publicKey, isSigner: true, isDebitable: true}],
programId,
});
await sendAndConfirmTransaction(connection, transaction, from);
@ -47,7 +47,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}],
keys: [{pubkey: from.publicKey, isSigner: true, isDebitable: true}],
programId,
});
await sendAndConfirmTransaction(connection, transaction, from);

View File

@ -29,7 +29,7 @@ test('load native program', async () => {
'solana_noop_program',
);
const transaction = new Transaction().add({
keys: [{pubkey: from.publicKey, isSigner: true}],
keys: [{pubkey: from.publicKey, isSigner: true, isDebitable: true}],
programId,
});

View File

@ -93,73 +93,73 @@ test('parse wire format and serialize', () => {
const wireTransaction = Buffer.from([
1,
91,
132,
173,
1,
218,
94,
253,
18,
27,
79,
207,
114,
27,
167,
127,
47,
50,
66,
17,
202,
183,
204,
12,
69,
243,
25,
206,
165,
116,
182,
64,
185,
168,
238,
168,
193,
140,
86,
83,
107,
252,
239,
80,
219,
90,
187,
49,
40,
91,
44,
6,
160,
84,
43,
227,
63,
170,
255,
185,
132,
242,
82,
46,
124,
217,
127,
147,
24,
254,
157,
77,
8,
58,
129,
51,
76,
13,
206,
126,
157,
189,
188,
53,
174,
42,
80,
4,
4,
212,
55,
67,
171,
34,
224,
81,
68,
230,
120,
117,
204,
241,
167,
152,
74,
141,
132,
73,
166,
217,
173,
27,
75,
62,
171,
160,
100,
159,
116,
164,
45,
185,
64,
0,
72,
4,
1,
0,
1,
2,
3,
19,
152,