mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 20:53:47 +01:00
Prevent locked UTXOs from being selected for spending by the UTXO selector
This commit is contained in:
parent
9b4cd9860a
commit
452cc12c8f
@ -41,7 +41,7 @@ public class UTXOService extends ServiceBase {
|
|||||||
Collections.sort(utxos);
|
Collections.sort(utxos);
|
||||||
//loop through each utxo
|
//loop through each utxo
|
||||||
for (CoinsInfo coinsInfo : utxos) {
|
for (CoinsInfo coinsInfo : utxos) {
|
||||||
if(!coinsInfo.isSpent()) { //filter out spent outputs
|
if(!coinsInfo.isSpent() && coinsInfo.isUnlocked()) { //filter out spent and locked outputs
|
||||||
if (sendAll) {
|
if (sendAll) {
|
||||||
// if send all, add all utxos and set amount to send all
|
// if send all, add all utxos and set amount to send all
|
||||||
selectedUtxos.add(coinsInfo.getKeyImage());
|
selectedUtxos.add(coinsInfo.getKeyImage());
|
||||||
|
Loading…
Reference in New Issue
Block a user