Fix xumulative reward tests

This commit is contained in:
Amir Bandeali
2019-09-24 23:01:44 -07:00
parent 410b9c50d3
commit c1871b5bca

View File

@@ -53,7 +53,7 @@ blockchainTests.resets('Cumulative Reward Tracking', env => {
// Creates CR for epoch 1
TestAction.Delegate,
],
[{ event: 'SetCumulativeReward', epoch: 0 }],
[],
);
});
it('re-delegating in the same epoch', async () => {
@@ -68,7 +68,7 @@ blockchainTests.resets('Cumulative Reward Tracking', env => {
// Updates CR for epoch 0
TestAction.Delegate,
],
[{ event: 'SetCumulativeReward', epoch: 0 }, { event: 'SetCumulativeReward', epoch: 0 }],
[],
);
});
it('delegating in new epoch', async () => {
@@ -268,7 +268,7 @@ blockchainTests.resets('Cumulative Reward Tracking', env => {
// Clears CR for epoch 2
TestAction.Delegate,
],
[{ event: 'SetCumulativeReward', epoch: 3 }],
[],
);
});
it('delegate in epoch 0 and 1, earn reward in epoch 3, then undelegate half', async () => {
@@ -303,7 +303,7 @@ blockchainTests.resets('Cumulative Reward Tracking', env => {
// Clears CR for epoch 2
TestAction.Undelegate,
],
[{ event: 'SetCumulativeReward', epoch: 3 }],
[],
);
});
it('delegate in epoch 1, 2, earn rewards in epoch 3, skip to epoch 4, then delegate', async () => {