From 068db4356943a8fe5c8d6acf54a94c9ab7ac980f Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 5 Feb 2013 12:04:16 +0100 Subject: [PATCH] Add a setter for the coin selector. --- core/src/main/java/com/google/bitcoin/core/Wallet.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index 1f45aeec..d431bf4f 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -2407,4 +2407,13 @@ public class Wallet implements Serializable, BlockChainListener { } return filter; } + + /** + * A coin selector is responsible for choosing which outputs to spend when creating transactions. The default + * selector implements a policy of spending transactions that appeared in the best chain and pending transactions + * that were created by this wallet, but not others. + */ + public synchronized void setCoinSelector(CoinSelector coinSelector) { + this.coinSelector = coinSelector; + } }