fix: fix transaction live test for credit-only accounts (#385)

This commit is contained in:
Tyera Eulberg 2019-06-29 09:48:24 -06:00 committed by Michael Vines
parent b22c39018f
commit eb56da4a94
1 changed files with 5 additions and 0 deletions

View File

@ -480,6 +480,11 @@ 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);
});