From 7c61db27b027be9ba9cebb292a30a34aa1c8a0ca Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Fri, 21 Jun 2024 12:38:48 -0500 Subject: [PATCH] fix random failure of crosschain swap E2E test --- e2e/runner/bitcoin.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/e2e/runner/bitcoin.go b/e2e/runner/bitcoin.go index d4dc3df15c..b2b82d2132 100644 --- a/e2e/runner/bitcoin.go +++ b/e2e/runner/bitcoin.go @@ -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 }