mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
fix get_spendable_utxos
This commit is contained in:
parent
2f74611844
commit
27c36a4dce
1 changed files with 3 additions and 5 deletions
|
@ -210,11 +210,9 @@ class BaseLedger(metaclass=LedgerRegistry):
|
||||||
async def get_spendable_utxos(self, amount: int, funding_accounts):
|
async def get_spendable_utxos(self, amount: int, funding_accounts):
|
||||||
async with self._utxo_reservation_lock:
|
async with self._utxo_reservation_lock:
|
||||||
txos = await self.get_effective_amount_estimators(funding_accounts)
|
txos = await self.get_effective_amount_estimators(funding_accounts)
|
||||||
selector = CoinSelector(
|
fee = self.transaction_class.output_class.pay_pubkey_hash(COIN, NULL_HASH32).get_fee(self)
|
||||||
txos, amount,
|
selector = CoinSelector(amount, fee)
|
||||||
self.transaction_class.output_class.pay_pubkey_hash(COIN, NULL_HASH32).get_fee(self)
|
spendables = selector.select(txos, self.coin_selection_strategy)
|
||||||
)
|
|
||||||
spendables = selector.select(self.coin_selection_strategy)
|
|
||||||
if spendables:
|
if spendables:
|
||||||
await self.reserve_outputs(s.txo for s in spendables)
|
await self.reserve_outputs(s.txo for s in spendables)
|
||||||
return spendables
|
return spendables
|
||||||
|
|
Loading…
Add table
Reference in a new issue