Skip to content

Commit

Permalink
fix: resolve random failure of cross-chain swap E2E test (#2369)
Browse files Browse the repository at this point in the history
* fix random failure of crosschain swap E2E test

* added changelog entry
  • Loading branch information
ws4charlie authored Jun 21, 2024
1 parent f9ca2be commit bae5b6a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
* [2299](https://github.com/zeta-chain/node/pull/2299) - add `zetae2e` command to deploy test contracts
* [2360](https://github.com/zeta-chain/node/pull/2360) - add stateful e2e tests.
* [2349](https://github.com/zeta-chain/node/pull/2349) - add TestBitcoinDepositRefund and WithdrawBitcoinMultipleTimes E2E tests
* [2369](https://github.com/zeta-chain/node/pull/2369) - fix random cross-chain swap failure caused by using tiny UTXO

### Fixes

Expand Down
11 changes: 11 additions & 0 deletions e2e/runner/bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ func (runner *E2ERunner) ListDeployerUTXOs() ([]btcjson.ListUnspentResult, error
return nil, err
}

// filter big-enough UTXOs for test if running on Regtest
if runner.IsLocalBitcoin() {
utxosFiltered := []btcjson.ListUnspentResult{}
for _, utxo := range utxos {
if utxo.Amount >= 1.0 {
utxosFiltered = append(utxosFiltered, utxo)
}
}
return utxosFiltered, nil
}

return utxos, nil
}

Expand Down

0 comments on commit bae5b6a

Please sign in to comment.