Skip to content

Commit

Permalink
fix low balance test
Browse files Browse the repository at this point in the history
  • Loading branch information
ridev6 committed Apr 15, 2024
1 parent cfb7659 commit 858e391
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/components/voting_emission/callables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,27 @@ export const votingEmission = {
);
return broadcastAndWait(invokeTx);
},

setMaxDepth: async ({
dApp, caller, value,
}) => {
const invokeTx = invokeScript(
{
dApp,
call: {
function: 'setMaxDepth',
args: [
{ type: 'integer', value },
],
},
payment: [],
additionalFee: 4e5,
chainId,
},
caller,
);
return broadcastAndWait(invokeTx);
},
};

export const boostingMock = {
Expand Down
3 changes: 3 additions & 0 deletions test/components/voting_emission/finalize_low_balance.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ describe(`${process.pid}: voting_emission: finalize (low balance)`, () => {
const { addr: dApp } = this.accounts.votingEmission;
const { value: startHeight } = await api.addresses.fetchDataKey(dApp, '%s%d__startHeight__0');
await waitForHeight(startHeight + epochLength + 1);
await votingEmission.setMaxDepth({
dApp, caller: this.accounts.votingEmission.seed, value: 20,
});
await votingEmission.finalize({
dApp, caller: this.accounts.pacemaker.seed,
});
Expand Down

0 comments on commit 858e391

Please sign in to comment.