OSDN Git Service

Fix fast sync bug when the chain has fork (#282)
[bytom/vapor.git] / netsync / chainmgr / block_process_test.go
index 4f1e024..5bc2075 100644 (file)
@@ -43,7 +43,7 @@ func TestBlockProcess(t *testing.T) {
                close(downloadNotifyCh)
        }()
        wg.Add(1)
-       bp.process(downloadNotifyCh, ProcessStopCh, &wg)
+       bp.process(downloadNotifyCh, ProcessStopCh, uint64(blockNum/2), &wg)
        if bp.chain.BestBlockHeight() != uint64(blockNum) {
                t.Fatalf("TestBlockProcess fail: got %d want %d", bp.chain.BestBlockHeight(), blockNum)
        }