Commit 16337c7a authored by QM's avatar QM

update

parent 726fbf3c
...@@ -14,6 +14,7 @@ import ( ...@@ -14,6 +14,7 @@ import (
"crypto/ecdsa" "crypto/ecdsa"
"errors" "errors"
"fmt" "fmt"
dexDeploy "github.com/33cn/plugin/plugin/dapp/dex/boss/deploy/ethereum"
"math/big" "math/big"
"regexp" "regexp"
"sync" "sync"
...@@ -129,7 +130,8 @@ func StartEthereumRelayer(startPara *EthereumStartPara) *Relayer4Ethereum { ...@@ -129,7 +130,8 @@ func StartEthereumRelayer(startPara *EthereumStartPara) *Relayer4Ethereum {
// Start clientSpec with infura ropsten provider // Start clientSpec with infura ropsten provider
relayerLog.Info("Relayer4Ethereum proc", "Started Ethereum websocket with provider:", ethRelayer.provider) relayerLog.Info("Relayer4Ethereum proc", "Started Ethereum websocket with provider:", ethRelayer.provider)
client, err := ethtxs.SetupWebsocketEthClient(ethRelayer.provider) //client, err := ethtxs.SetupWebsocketEthClient(ethRelayer.provider)
client, err := dexDeploy.SetupWebsocketEthClient(ethRelayer.provider)
if err != nil { if err != nil {
panic(err) panic(err)
} }
...@@ -139,12 +141,9 @@ func StartEthereumRelayer(startPara *EthereumStartPara) *Relayer4Ethereum { ...@@ -139,12 +141,9 @@ func StartEthereumRelayer(startPara *EthereumStartPara) *Relayer4Ethereum {
clientChainID, err := client.NetworkID(ctx) clientChainID, err := client.NetworkID(ctx)
if err != nil { if err != nil {
errinfo := fmt.Sprintf("Failed to get NetworkID due to:%s", err.Error()) errinfo := fmt.Sprintf("Failed to get NetworkID due to:%s", err.Error())
//panic(errinfo) panic(errinfo)
relayerLog.Info("QM_NetworkID", "errinfo :", errinfo)
ethRelayer.clientChainID = big.NewInt(97)
} else {
ethRelayer.clientChainID = clientChainID
} }
ethRelayer.clientChainID = clientChainID
ethRelayer.totalTxRelayFromChain33 = ethRelayer.getTotalTxAmount2Eth() ethRelayer.totalTxRelayFromChain33 = ethRelayer.getTotalTxAmount2Eth()
if 0 == ethRelayer.totalTxRelayFromChain33 { if 0 == ethRelayer.totalTxRelayFromChain33 {
statics := &ebTypes.Ethereum2Chain33Statics{} statics := &ebTypes.Ethereum2Chain33Statics{}
......
...@@ -21,8 +21,8 @@ func main() { ...@@ -21,8 +21,8 @@ func main() {
buildFlags.RPCAddr4Chain33 = testTLS(buildFlags.RPCAddr4Chain33) buildFlags.RPCAddr4Chain33 = testTLS(buildFlags.RPCAddr4Chain33)
if buildFlags.RPCAddr4Ethereum == "" { if buildFlags.RPCAddr4Ethereum == "" {
//buildFlags.RPCAddr4Ethereum = "https://data-seed-prebsc-1-s1.binance.org:8545" buildFlags.RPCAddr4Ethereum = "https://data-seed-prebsc-1-s1.binance.org:8545"
buildFlags.RPCAddr4Ethereum = "wss://ws-testnet.huobichain.com" //buildFlags.RPCAddr4Ethereum = "wss://ws-testnet.huobichain.com"
} }
rootCmd := RootCmd() rootCmd := RootCmd()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment