diff --git a/pkg/maintainer/spv/moved_funds_sweep_test.go b/pkg/maintainer/spv/moved_funds_sweep_test.go index 9e37c4fefa..f52b449a53 100644 --- a/pkg/maintainer/spv/moved_funds_sweep_test.go +++ b/pkg/maintainer/spv/moved_funds_sweep_test.go @@ -246,20 +246,13 @@ func TestGetUnprovenMovedFundsSweepTransactions(t *testing.T) { // Wallet 2: https://live.blockcypher.com/btc-testnet/address/tb1q3k6sadfqv04fmx9naty3fzdfpaecnphkfm3cf3/ walletPublicKeyHash: bytes20FromHex("8db50eb52063ea9d98b3eac91489a90f738986f6"), data: &tbtc.WalletChainData{ - // Make the main UTXO point to Transaction 1. - MainUtxoHash: mainUtxoHash( - "a586427d66f8ccca1ed8f7e40a2c82aae99a1f85dfce62ffe2f3657350b6fd84", - 0, - 28700, - ), + // Simulate the wallet has no main UTXO. + MainUtxoHash: [32]byte{}, State: tbtc.StateLive, PendingMovedFundsSweepRequestsCount: 1, }, transactions: []*bitcoin.Transaction{ - // Transaction 1: Moved funds sweep transaction: https://live.blockcypher.com/btc-testnet/tx/fc78f52ab4094b5c0bf8a782750c24f31b5db2667425fbddccc29d64f89baf9b/ - txFromHex("0100000000010218201d563e43a926f5f9fd4498af5c513a3ea284373308aeda39b0a0d57585780000000000ffffffff84fdb6507365f3e2ff62cedf851f9ae9aa822c0ae4f7d81ecaccf8667d4286a50000000000ffffffff0104a60000000000001600148db50eb52063ea9d98b3eac91489a90f738986f60248304502210089dfa958867b2265d0fc08d996af82a9a731bd972f20e0530d37937f38d9ec1002200cbc820a696b99747aed39aeed5d848367773cf6d4e24aaa12fe2ad714a1ff99012103989d253b17a6a0f41838b84ff0d20e8898f9d7b1a98f2564da4cc29dcf8581d902473044022063dc201589b1f7810247eaa569baf5e3dda8717a10e77a2ad95661fef643bdc602203bee4dd0c4a24291523bb7542394df4e6008c0c7ddfdd30c41d55036b32a8999012103989d253b17a6a0f41838b84ff0d20e8898f9d7b1a98f2564da4cc29dcf8581d900000000"), - - // Transaction 2: Transaction that created the main UTXO: https://live.blockcypher.com/btc-testnet/tx/a586427d66f8ccca1ed8f7e40a2c82aae99a1f85dfce62ffe2f3657350b6fd84/ + // Transaction 1: Moved funds sweep transaction: https://live.blockcypher.com/btc-testnet/tx/a586427d66f8ccca1ed8f7e40a2c82aae99a1f85dfce62ffe2f3657350b6fd84/ txFromHex("010000000001019b1b33bdd3c44404544991889d63afe6caa875983b705106f1d988251d1459200000000000ffffffff011c700000000000001600148db50eb52063ea9d98b3eac91489a90f738986f6024730440220242dbac95ab8e632cd2791e99d3048b96e6e042bcd902f30fbae7e942a24ea3e02201b7416e6d7d36ea142521eb80e0bc29d118f62ab6b8a64a062cc5812cfdb8c89012103989d253b17a6a0f41838b84ff0d20e8898f9d7b1a98f2564da4cc29dcf8581d900000000"), }, }, @@ -305,16 +298,10 @@ func TestGetUnprovenMovedFundsSweepTransactions(t *testing.T) { state tbtc.MovedFundsSweepRequestState }{ // Moved funds sweep request from Wallet 2. - { - "788575d5a0b039daae08333784a23e3a515caf9844fdf9f526a9433e561d2018", - 0, - tbtc.MovedFundsStatePending, - }, - // Wallet main UTXO transaction from Wallet 2. { "2059141d2588d9f10651703b9875a8cae6af639d889149540444c4d3bd331b9b", 0, - tbtc.MovedFundsStateUnknown, + tbtc.MovedFundsStatePending, }, // Wallet main UTXO transaction from Wallet 3. {