Skip to content

Commit

Permalink
revert the log prints for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed May 29, 2024
1 parent 0e38245 commit db85efc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
4 changes: 0 additions & 4 deletions e2e/e2etests/test_crosschain_swap.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ func TestCrosschainSwap(r *runner.E2ERunner, _ []string) {
r.Logger.Info("******* Second test: BTC -> ERC20ZRC20")
// Note: the test needs at least 0.1001 BTC
utxos := r.ListDeployerUTXOs(1.0)
r.Logger.Print(fmt.Sprintf("There are %d utxos before SendToTSSFromDeployerWithMemo", len(utxos)))
r.Logger.Info("#utxos %d", len(utxos))
r.Logger.Info("memo address %s", r.ERC20ZRC20Addr)
memo, err := r.ZEVMSwapApp.EncodeMemo(&bind.CallOpts{}, r.ERC20ZRC20Addr, r.DeployerAddress.Bytes())
Expand All @@ -149,8 +148,6 @@ func TestCrosschainSwap(r *runner.E2ERunner, _ []string) {
memo = append(r.ZEVMSwapAppAddr.Bytes(), memo...)
r.Logger.Info("memo length %d", len(memo))

r.Logger.Print(fmt.Sprintf("SendToTSSFromDeployerWithMemo deploer address: %s\n", r.BTCDeployerAddress))
r.Logger.Print("SendToTSSFromDeployerWithMemo-1")
txID, err := r.SendToTSSFromDeployerWithMemo(
r.BTCTSSAddress,
0.01,
Expand Down Expand Up @@ -199,7 +196,6 @@ func TestCrosschainSwap(r *runner.E2ERunner, _ []string) {
memo = append(r.ZEVMSwapAppAddr.Bytes(), memo...)
r.Logger.Info("memo length %d", len(memo))

r.Logger.Print("SendToTSSFromDeployerWithMemo-2")
amount := 0.1
txid, err := r.SendToTSSFromDeployerWithMemo(
r.BTCTSSAddress,
Expand Down
29 changes: 0 additions & 29 deletions e2e/runner/bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,35 +298,6 @@ func (runner *E2ERunner) SendToTSSFromDeployerWithMemo(
panic(err)
}

// print transaction inputs
runner.Logger.Info("SignRawTransactionWithWallet2 input: %+v", inputsForSign)
for _, input := range inputUTXOs {
runner.Logger.Print(" txid: %s", input.TxID)
runner.Logger.Print(" vout: %d", input.Vout)
runner.Logger.Print(" address: %s", input.Address)
runner.Logger.Print(" amount: %f", input.Amount)
runner.Logger.Print(" confirmations: %d", input.Confirmations)
}

// retry for 10 times if not signed
if !signed {
for i := 0; i < 10; i++ {
runner.Logger.Print(fmt.Sprintf("retrying SignRawTransactionWithWallet2: %d", i+1))
stx, signed, err = btcRPC.SignRawTransactionWithWallet2(tx, inputsForSign)
if err != nil {
panic(err)
}
if signed {
break
}
time.Sleep(1 * time.Second)
_, err = btcRPC.GenerateToAddress(1, btcDeployerAddress, nil)
if err != nil {
panic(err)
}
}
}

if !signed {
panic("btc transaction not signed")
}
Expand Down

0 comments on commit db85efc

Please sign in to comment.