fix : removed debug logs

This commit is contained in:
Shivam Sharma 2022-08-02 10:34:25 +05:30
parent 423734c0d4
commit a69109ce5e

View file

@ -2,7 +2,6 @@ package bor
import ( import (
"context" "context"
"fmt"
"math/big" "math/big"
"testing" "testing"
@ -170,7 +169,7 @@ func TestGetTransactionReceiptsByBlock(t *testing.T) {
} }
if err := blockBatch.Write(); err != nil { if err := blockBatch.Write(); err != nil {
fmt.Println("Failed to write block into disk", "err", err) t.Error("Failed to write block into disk", "err", err)
} }
} }
@ -179,7 +178,7 @@ func TestGetTransactionReceiptsByBlock(t *testing.T) {
// check 1 : zero transactions // check 1 : zero transactions
receiptsOut, err := publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(1)) receiptsOut, err := publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(1))
if err != nil { if err != nil {
fmt.Println(err) t.Error(err)
} }
assert.Equal(t, 0, len(receiptsOut)) assert.Equal(t, 0, len(receiptsOut))
@ -187,7 +186,7 @@ func TestGetTransactionReceiptsByBlock(t *testing.T) {
// check 2 : one transactions ( normal ) // check 2 : one transactions ( normal )
receiptsOut, err = publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(2)) receiptsOut, err = publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(2))
if err != nil { if err != nil {
fmt.Println(err) t.Error(err)
} }
assert.Equal(t, 1, len(receiptsOut)) assert.Equal(t, 1, len(receiptsOut))
@ -196,7 +195,7 @@ func TestGetTransactionReceiptsByBlock(t *testing.T) {
// check 3 : two transactions ( both normal ) // check 3 : two transactions ( both normal )
receiptsOut, err = publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(3)) receiptsOut, err = publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(3))
if err != nil { if err != nil {
fmt.Println(err) t.Error(err)
} }
assert.Equal(t, 2, len(receiptsOut)) assert.Equal(t, 2, len(receiptsOut))
@ -205,7 +204,7 @@ func TestGetTransactionReceiptsByBlock(t *testing.T) {
// check 4 : two transactions ( one normal + one state-sync) // check 4 : two transactions ( one normal + one state-sync)
receiptsOut, err = publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(4)) receiptsOut, err = publicBlockchainAPI.GetTransactionReceiptsByBlock(context.Background(), rpc.BlockNumberOrHashWithNumber(4))
if err != nil { if err != nil {
fmt.Println(err) t.Error(err)
} }
assert.Equal(t, 2, len(receiptsOut)) assert.Equal(t, 2, len(receiptsOut))