diff --git a/bchain/coins/eth/ethrpc_test.go b/bchain/coins/eth/ethrpc_test.go index 943c9f1e..9017111f 100644 --- a/bchain/coins/eth/ethrpc_test.go +++ b/bchain/coins/eth/ethrpc_test.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" ) -var rpcURL = flag.String("rpc", "ws://10.34.3.4:18546", "URL of geth server") +var rpcURL = flag.String("rpc", "ws://blockbook-dev:18546", "URL of geth server") var ethClient *ethclient.Client var ethRPCClient *rpc.Client @@ -30,7 +30,8 @@ func setupEthRPC() *EthereumRPC { client: ethClient, rpc: ethRPCClient, timeout: time.Duration(25) * time.Second, - rpcURL: "ws://10.34.3.4:18546", + rpcURL: *rpcURL, + Parser: NewEthereumParser(), } } @@ -359,6 +360,18 @@ func TestEthRPC_GetBlock(t *testing.T) { } func TestEthRPC_GetTransaction(t *testing.T) { + var ( + addr1, addr2 bchain.Address + err error + ) + addr1, err = bchain.NewBaseAddress("0x682b7903a11098cf770c7aef4aa02a85b3f3601a") + if err == nil { + addr2, err = bchain.NewBaseAddress("0x555ee11fbddc0e49a9bab358a8941ad95ffdb48f") + } + if err != nil { + panic(err) + } + if testing.Short() { t.Skip("skipping test in short mode.") } @@ -403,12 +416,13 @@ func TestEthRPC_GetTransaction(t *testing.T) { ScriptPubKey: bchain.ScriptPubKey{ Addresses: []string{"0x682b7903a11098cf770c7aef4aa02a85b3f3601a"}, }, + Address: addr1, }, }, }, }, { - name: "1", + name: "2", fields: fields{ b: setupEthRPC(), }, @@ -431,6 +445,7 @@ func TestEthRPC_GetTransaction(t *testing.T) { ScriptPubKey: bchain.ScriptPubKey{ Addresses: []string{"0x555ee11fbddc0e49a9bab358a8941ad95ffdb48f"}, }, + Address: addr2, }, }, }, diff --git a/configs/eth-testnet.json b/configs/eth-testnet.json index 2b642b50..362c7a43 100644 --- a/configs/eth-testnet.json +++ b/configs/eth-testnet.json @@ -1,4 +1,4 @@ { - "rpcURL": "ws://10.34.3.4:18546", + "rpcURL": "ws://localhost:18546", "rpcTimeout": 25 } \ No newline at end of file diff --git a/configs/eth.json b/configs/eth.json index 3ce3226c..4f8c063e 100644 --- a/configs/eth.json +++ b/configs/eth.json @@ -1,4 +1,4 @@ { - "rpcURL": "ws://10.34.3.4:8546", + "rpcURL": "ws://localhost:8546", "rpcTimeout": 25 } \ No newline at end of file