From 91518464c22dff7efdd4cf917710d0bdb6e13df9 Mon Sep 17 00:00:00 2001 From: catbref Date: Tue, 4 Aug 2020 12:26:09 +0100 Subject: [PATCH] WIP: trade-bot: fix empty bitcoin wallet edge case when finding UTXOs --- src/main/java/org/qortal/crosschain/BTC.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/qortal/crosschain/BTC.java b/src/main/java/org/qortal/crosschain/BTC.java index 6d17fb06..48bb51c6 100644 --- a/src/main/java/org/qortal/crosschain/BTC.java +++ b/src/main/java/org/qortal/crosschain/BTC.java @@ -293,6 +293,9 @@ public class BTC { // Fully spent key - case (a) btc.spentKeys.add(key); wallet.getActiveKeyChain().markKeyAsUsed((DeterministicKey) key); + } else { + // Key never been used - case (b) + areAllKeysSpent = false; } continue;