Skip to content

Commit

Permalink
Remove leftover logging from sync_manager_test
Browse files Browse the repository at this point in the history
Darko Brdareski committed Feb 22, 2022
1 parent 34bfd13 commit 10c939b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions chain/sync_manager_test.go
Original file line number Diff line number Diff line change
@@ -247,23 +247,20 @@ func TestSyncManagerBucketSet(t *testing.T) {
ts2 := mock.TipSet(mock.MkBlock(ts1, 1, 0))
bucket1 := newSyncTargetBucket(ts1, ts2)
bucketSet := syncBucketSet{buckets: []*syncTargetBucket{bucket1}}
fmt.Println("bucketSet: ", bucketSet.String())

// inserting a tipset (potential sync target) from an existing chain, should add to an existing bucket
//stm: @CHAIN_SYNCER_ADD_SYNC_TARGET_001
ts3 := mock.TipSet(mock.MkBlock(ts2, 2, 0))
bucketSet.Insert(ts3)
require.Equal(t, 1, len(bucketSet.buckets))
require.Equal(t, 3, len(bucketSet.buckets[0].tips))
fmt.Println("bucketSet: ", bucketSet.String())

// inserting a tipset from new chain, should create a new bucket
ts4fork := mock.TipSet(mock.MkBlock(nil, 1, 1))
bucketSet.Insert(ts4fork)
require.Equal(t, 2, len(bucketSet.buckets))
require.Equal(t, 3, len(bucketSet.buckets[0].tips))
require.Equal(t, 1, len(bucketSet.buckets[1].tips))
fmt.Println("bucketSet: ", bucketSet.String())

// Pop removes the best bucket (best sync target), e.g. bucket1
//stm: @CHAIN_SYNCER_SELECT_SYNC_TARGET_001

0 comments on commit 10c939b

Please sign in to comment.