@@ -326,15 +326,6 @@ func TestCheckHash2(t *testing.T) {
326
326
func TestChainForkRollBack (t * testing.T ) {
327
327
c , accountMap , _ := SetUp (t , 3 , 100 , 2 )
328
328
curSnapshotBlock := c .GetLatestSnapshotBlock ()
329
- fmt .Println (curSnapshotBlock .Height )
330
- TearDown (c )
331
-
332
- // height
333
- height := uint64 (30 )
334
- upgrade .CleanupUpgradeBox ()
335
- upgrade .InitUpgradeBox (upgrade .NewEmptyUpgradeBox ().AddPoint (1 , height ))
336
-
337
- c , accountMap , _ = SetUp (t , 10 , 0 , 0 )
338
329
339
330
defer func () {
340
331
TearDown (c )
@@ -343,12 +334,8 @@ func TestChainForkRollBack(t *testing.T) {
343
334
}
344
335
}()
345
336
346
- curSnapshotBlocknew := c .GetLatestSnapshotBlock ()
347
-
348
- fmt .Println (curSnapshotBlocknew .Height , curSnapshotBlocknew .Height == height - 1 )
349
- if curSnapshotBlocknew .Height != height - 1 {
350
- t .Fatal (fmt .Sprintf ("not equal %+v, %d" , curSnapshotBlocknew , height - 1 ))
351
- }
337
+ upgrade .CleanupUpgradeBox ()
338
+ upgrade .InitUpgradeBox (upgrade .NewEmptyUpgradeBox ().AddPoint (1 , curSnapshotBlock .Height + 1 ))
352
339
353
340
InsertAccountBlocks (nil , c , accountMap , 5 )
354
341
@@ -377,8 +364,8 @@ func TestChainForkRollBack(t *testing.T) {
377
364
return sc
378
365
}
379
366
sb := & ledger.SnapshotBlock {
380
- PrevHash : curSnapshotBlocknew .Hash ,
381
- Height : curSnapshotBlocknew .Height + 1 ,
367
+ PrevHash : curSnapshotBlock .Hash ,
368
+ Height : curSnapshotBlock .Height + 1 ,
382
369
Timestamp : & timeNow ,
383
370
SnapshotContent : createSnaoshotContent (),
384
371
}
0 commit comments