Skip to content

Commit

Permalink
Have makeOpReturnCommitment use random UTXO selection (#2320)
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Dec 7, 2020
1 parent cbd6ea2 commit d884f7b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion wallet/src/main/scala/org/bitcoins/wallet/Wallet.scala
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,19 @@ abstract class Wallet

val output = TransactionOutput(0.satoshis, scriptPubKey)

sendToOutputs(Vector(output), feeRate, fromAccount)
for {
(txBuilder, utxoInfos) <- fundRawTransactionInternal(
destinations = Vector(output),
feeRate = feeRate,
fromAccount = fromAccount,
coinSelectionAlgo = CoinSelectionAlgo.RandomSelection,
fromTagOpt = None)
tx <- finishSend(txBuilder,
utxoInfos,
CurrencyUnits.zero,
feeRate,
Vector.empty)
} yield tx
}

override def sendToOutputs(
Expand Down

0 comments on commit d884f7b

Please sign in to comment.