Package org.bitcoinj.wallet

Examples of org.bitcoinj.wallet.CoinSelection


    }

    // Returns a spendable output of exactly the given value.
    @Nullable
    private TransactionOutput findAvailableStub(Coin value) {
        CoinSelection selection = coinSelector.select(value, calculateAllSpendCandidates(true));
        if (selection.valueGathered.compareTo(value) < 0)
            return null;
        return findOutputOfValue(value, selection.gathered);
    }
View Full Code Here


                candidates.removeAll(pledges.keySet());
            }
            // Search for a perfect match first, to see if we can avoid creating a dependency transaction.
            for (TransactionOutput op : candidates)
                if (op.getValue().equals(target))
                    return new CoinSelection(op.getValue(), ImmutableList.of(op));
            // Delegate back to the default behaviour.
            return super.select(target, candidates);
        }
View Full Code Here

TOP

Related Classes of org.bitcoinj.wallet.CoinSelection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.