HomePhabricator

[ecash-wallet] Return the sats selection strategy used to selectUtxos from the…

Description

[ecash-wallet] Return the sats selection strategy used to selectUtxos from the selectUtxos method

Summary:
The sats selection strategy used to select utxos cannot necessarily be inferred. There is at least one edge case where we have 0 missing sats but still cannot cover the fee, i.e. when we are attempting to send 1 token utxo to 1 output (also a token utxo).

If we do not specify that this came from a NO_SATS strategy, the build() function will see it and do what it is designed to do, add some fuel utxos and build the tx.

But in this case, we specifically do not want to add fuel utxos, as we selected the NO_SATS strategy.

So, return the sats selection strategy used to select utxos. In this way it is available for tx building functions to appropriately parse.

Test Plan: npm test, CI for integration tests

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18841

Details

Provenance
bytesofmanAuthored on Mon, Oct 27, 17:48
bytesofmanPushed on Mon, Oct 27, 20:47
Reviewer
Restricted Project
Differential Revision
D18841: [ecash-wallet] Return the sats selection strategy used to selectUtxos from the selectUtxos method
Parents
rABCda5d0a7ac2f1: [ecash-agora, ecash-wallet, ecash-lib] Add a new take method to the AgoraOffer…
Branches
Unknown
Tags
Unknown