Skip to content

Commit 830090a

Browse files
authored
Include utxo with datum and script in utxo selection (#222)
A utxo with datum and script attached isn't necessarily unspendable.
1 parent 432a619 commit 830090a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pycardano/txbuilder.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1008,13 +1008,7 @@ def build(
10081008

10091009
for address in self.input_addresses:
10101010
for utxo in self.context.utxos(address):
1011-
if (
1012-
utxo not in seen_utxos
1013-
and utxo not in self.excluded_inputs
1014-
and not utxo.output.datum_hash # UTxO with datum should be added by using `add_script_input`
1015-
and not utxo.output.datum
1016-
and not utxo.output.script
1017-
):
1011+
if utxo not in seen_utxos and utxo not in self.excluded_inputs:
10181012
additional_utxo_pool.append(utxo)
10191013
additional_amount += utxo.output.amount
10201014
seen_utxos.add(utxo)

0 commit comments

Comments
 (0)