Skip to content

Commit

Permalink
feat: feat: new unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oxf71 committed Nov 21, 2023
1 parent 9aafe3d commit d1d3bd0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bitcoin/indexer_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package bitcoin
package bitcoin_test

import (
"testing"

"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/rpcclient"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/evmos/ethermint/bitcoin"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -53,7 +54,7 @@ func TestNewBitcoinIndexer(t *testing.T) {
}

for _, tc := range testCases {
_, err := NewBitcoinIndexer(mockRpcClient(t),
_, err := bitcoin.NewBitcoinIndexer(mockRpcClient(t),
&chaincfg.MainNetParams, // chainParams Do not affect the address
tc.listendAddress)
if err != nil {
Expand Down Expand Up @@ -140,8 +141,8 @@ func mockRpcClient(t *testing.T) *rpcclient.Client {
return client
}

func mockBitcoinIndexer(t *testing.T, chainParams *chaincfg.Params) *Indexer {
indexer, err := NewBitcoinIndexer(mockRpcClient(t),
func mockBitcoinIndexer(t *testing.T, chainParams *chaincfg.Params) *bitcoin.Indexer {
indexer, err := bitcoin.NewBitcoinIndexer(mockRpcClient(t),
chainParams,
"tb1qukxc3sy3s3k5n5z9cxt3xyywgcjmp2tzudlz2n")
require.NoError(t, err)
Expand Down

0 comments on commit d1d3bd0

Please sign in to comment.