Skip to content

Commit

Permalink
chore: removing prints
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed Dec 1, 2021
1 parent 1fe6740 commit de90ca3
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/blocktree/blocktree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func newBlockTreeFromNode(root *node) *BlockTree {
}

func createTestBlockTree(t *testing.T, header *types.Header, number int) (*BlockTree, []testBranch) {
fmt.Printf("Building the block tree\n")
bt := NewBlockTreeFromRoot(header)
previousHash := header.Hash()

Expand All @@ -60,8 +59,6 @@ func createTestBlockTree(t *testing.T, header *types.Header, number int) (*Block
err := bt.AddBlock(header, time.Unix(0, at))
require.NoError(t, err)

fmt.Printf("BUILDING #%v (%v) => %s\n", i, at, hash)

previousHash = hash

isBranch := r.Intn(2)
Expand Down Expand Up @@ -93,8 +90,6 @@ func createTestBlockTree(t *testing.T, header *types.Header, number int) (*Block
err := bt.AddBlock(header, time.Unix(0, at))
require.NoError(t, err)

fmt.Printf("BRANCHING #%v (%v) => %s\n", branch.number.Uint64(), at, hash)

previousHash = hash
at += int64(r.Intn(8))

Expand Down Expand Up @@ -466,16 +461,11 @@ func TestBlockTree_GetHashByNumber(t *testing.T) {
best := bt.DeepestBlockHash()
bn := bt.getNode(best)

fmt.Printf("Assert the descendents\n")
for i := int64(0); i < bn.number.Int64(); i++ {
deepest := bt.leaves.deepestLeaf()

hash, err := bt.GetHashByNumber(big.NewInt(i))
require.NoError(t, err)
require.Equal(t, big.NewInt(i), bt.getNode(hash).number)
desc, err := bt.IsDescendantOf(hash, best)
fmt.Printf("%s -> %s\n", hash, deepest.hash)

require.NoError(t, err)
require.True(t, desc, fmt.Sprintf("index %d failed, got hash=%s", i, hash))
}
Expand Down

0 comments on commit de90ca3

Please sign in to comment.