Since #2063, the mempool has limits for how many txs are allowed to form a cluster and how big in bytes that cluster can be. Currently the wallet doesn't take these limits into account, so it's possible for it to create a tx that will be rejected by the mempool.
At the very least, the wallet should:
- Prefer confirmed utxos during utxo selection, to avoid forming clusters.
- After the tx is constructed, it should ask the mempool for the tx count and byte size of the cluster that will be formed if this tx is added (for which the corresponding methods should be exposed in node RPC) and then, ideally, try some other utxo combination.
Also note that even though currently the mempool only tracks utxo-based relations (#2065), the wallet should be prepared that at some point this won't be the case anymore and take into account non-utxo relations too.
There are some other possible improvements in utxo selection, see the TODO near Account::select_inputs_for_send_request.
P.S. if a general utxo selection revamp is attempted, then this - #1923 - should probably be fixed as well.
Since #2063, the mempool has limits for how many txs are allowed to form a cluster and how big in bytes that cluster can be. Currently the wallet doesn't take these limits into account, so it's possible for it to create a tx that will be rejected by the mempool.
At the very least, the wallet should:
Also note that even though currently the mempool only tracks utxo-based relations (#2065), the wallet should be prepared that at some point this won't be the case anymore and take into account non-utxo relations too.
There are some other possible improvements in utxo selection, see the TODO near
Account::select_inputs_for_send_request.P.S. if a general utxo selection revamp is attempted, then this - #1923 - should probably be fixed as well.