@@ -55,7 +55,7 @@ describe('AssignCollectionsRandomly', function () {
55
55
56
56
describe ( 'razor' , async ( ) => {
57
57
it ( 'Assign Collections Randomly End to End Flow' , async ( ) => {
58
- await network . provider . send ( 'evm_setNextBlockTimestamp' , [ 2625097600 ] ) ;
58
+ await network . provider . send ( 'evm_setNextBlockTimestamp' , [ 2625095600 ] ) ;
59
59
60
60
/* ///////////////////////////////////////////////////////////////
61
61
SETUP
@@ -201,27 +201,28 @@ describe('AssignCollectionsRandomly', function () {
201
201
await assertRevert ( blockManager . connect ( signers [ 19 ] ) . finalizeDispute ( epoch , 0 , collectionIndexInBlock ) , 'Block proposed with same medians' ) ;
202
202
203
203
// Give Sorted and FinaliseDispute on non-revealed asset
204
- await blockManager . giveSorted ( epoch , 3 , [ 400 ] ) ;
204
+ await blockManager . giveSorted ( epoch , 0 , [ 100 ] ) ;
205
205
collectionIndexInBlock = await getCollectionIdPositionInBlock ( epoch , await blockManager . sortedProposedBlockIds ( epoch , 0 ) ,
206
206
signers [ 0 ] , blockManager , collectionManager ) ;
207
207
await assertRevert ( blockManager . finalizeDispute ( epoch , 0 , collectionIndexInBlock ) , 'Invalid dispute' ) ;
208
208
209
209
// disputeForProposedCollectionIds
210
210
await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 2 ) , 'Dispute: ID present only' ) ;
211
211
await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 3 ) , 'Dispute: ID present only' ) ;
212
- await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 5 ) , 'Dispute: ID present only' ) ;
213
- await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 6 ) , 'Dispute: ID present only' ) ;
212
+ await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 4 ) , 'Dispute: ID present only' ) ;
213
+ await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 5 ) , 'Dispute: ID should be absent' ) ;
214
+ await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 6 ) , 'Dispute: ID should be absent' ) ;
214
215
await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 7 ) , 'Dispute: ID present only' ) ;
215
- await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 1 ) , 'Dispute: ID present only' ) ;
216
- await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 4 ) , 'Dispute: ID should be absent' ) ;
216
+ await assertRevert ( blockManager . disputeCollectionIdShouldBePresent ( epoch , 0 , 1 ) , 'Dispute: ID should be absent' ) ;
217
217
218
218
await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 2 , 0 ) , 'Dispute: ID should be present' ) ;
219
219
await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 3 , 0 ) , 'Dispute: ID should be present' ) ;
220
- await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 5 , 0 ) , 'Dispute: ID should be present' ) ;
221
- await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 6 , 0 ) , 'Dispute: ID should be present' ) ;
220
+ await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 4 , 0 ) , 'Dispute: ID should be present' ) ;
221
+ await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 5 , 0 ) , 'Dispute: ID absent only' ) ;
222
+ await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 6 , 0 ) , 'Dispute: ID absent only' ) ;
222
223
await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 7 , 0 ) , 'Dispute: ID should be present' ) ;
223
- await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 1 , 0 ) , 'Dispute: ID should be present ' ) ;
224
- await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 4 , 0 ) , 'Dispute: ID absent only' ) ;
224
+ await assertRevert ( blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 1 , 0 ) , 'Dispute: ID absent only ' ) ;
225
+
225
226
// the id itself doesnt exist
226
227
await assertRevert ( blockManager . disputeOnOrderOfIds ( epoch , 0 , 1 , 0 ) , 'index1 not greater than index0 0' ) ;
227
228
await assertRevert ( blockManager . disputeOnOrderOfIds ( epoch , 0 , 0 , 1 ) , 'ID at i0 not gt than of i1' ) ;
@@ -295,11 +296,10 @@ describe('AssignCollectionsRandomly', function () {
295
296
await restoreSnapshot ( snapshotId ) ;
296
297
snapshotId = await takeSnapshot ( ) ;
297
298
// additional 2
298
- await adhocPropose ( signers [ 1 ] , [ 1 , 2 , 4 , 5 , 6 , 7 ] , [ 100 , 200 , 400 , 500 , 600 , 700 ] , stakeManager , blockManager , voteManager ) ;
299
+ await adhocPropose ( signers [ 1 ] , [ 1 , 2 , 8 , 5 , 6 , 7 ] , [ 100 , 200 , 800 , 500 , 600 , 700 ] , stakeManager , blockManager , voteManager ) ;
299
300
await mineToNextState ( ) ;
300
301
const epoch = await getEpoch ( ) ;
301
-
302
- await blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 4 , 2 ) ;
302
+ await blockManager . disputeCollectionIdShouldBeAbsent ( epoch , 0 , 8 , 2 ) ;
303
303
const blockIndexToBeConfirmed = await blockManager . blockIndexToBeConfirmed ( ) ;
304
304
const block = await blockManager . getProposedBlock ( epoch , 0 ) ;
305
305
expect ( blockIndexToBeConfirmed ) . to . eq ( - 1 ) ;
0 commit comments