diff --git a/src/main/java/org/qortal/crosschain/Bitcoiny.java b/src/main/java/org/qortal/crosschain/Bitcoiny.java index 2678a08e..f9951aab 100644 --- a/src/main/java/org/qortal/crosschain/Bitcoiny.java +++ b/src/main/java/org/qortal/crosschain/Bitcoiny.java @@ -229,6 +229,25 @@ public abstract class Bitcoiny implements ForeignBlockchain { return transaction.getOutputs(); } + /** + * Returns transactions for passed script + *

+ * @throws ForeignBlockchainException if error occurs + */ + public List getAddressTransactions(byte[] scriptPubKey, boolean includeUnconfirmed) throws ForeignBlockchainException { + int retries = 0; + ForeignBlockchainException e2 = null; + while (retries <= 3) { + try { + return this.blockchain.getAddressTransactions(scriptPubKey, includeUnconfirmed); + } catch (ForeignBlockchainException e) { + e2 = e; + retries++; + } + } + throw(e2); + } + /** * Returns list of transaction hashes pertaining to passed address. *

@@ -263,7 +282,17 @@ public abstract class Bitcoiny implements ForeignBlockchain { * @throws ForeignBlockchainException if error occurs */ public BitcoinyTransaction getTransaction(String txHash) throws ForeignBlockchainException { - return this.blockchain.getTransaction(txHash); + int retries = 0; + ForeignBlockchainException e2 = null; + while (retries <= 3) { + try { + return this.blockchain.getTransaction(txHash); + } catch (ForeignBlockchainException e) { + e2 = e; + retries++; + } + } + throw(e2); } /**