38 Commits
Author SHA1 Message Date
ishaanam 5c8bf7b39e doc: add release notes for version 3 transactions 2025-08-15 11:24:51 -04:00
ishaanam 4ef8065a5e test: add truc wallet tests 2025-08-15 11:24:51 -04:00
ishaanam 5d932e14db test: extract bulk_vout from bulk_tx so it can be used by wallet tests 2025-08-15 11:24:51 -04:00
ishaanam c5a2d08011 wallet: don't return utxos from multiple truc txs in AvailableCoins 2025-08-15 11:05:28 -04:00
ishaanam da8748ad62 wallet: limit v3 tx weight in coin selection 2025-08-15 10:45:36 -04:00
ishaanam 85c5410615 wallet: mark unconfirmed v3 siblings as mempool conflicts 2025-08-15 10:45:36 -04:00
ishaanam 0804fc3cb1 wallet: throw error at conflicting tx versions in pre-selected inputs 2025-08-15 10:45:36 -04:00
ishaanam cc155226fe wallet: set m_version in coin control to default value
In future commits we assume that coin_control.m_version has a
value when making sure that we follow truc rules, so we should
give it a default value of CTransaction::CURRENT_VERSION.
2025-08-15 10:45:36 -04:00
ishaanam 2e9617664e wallet: don't include unconfirmed v3 txs with children in available coins 2025-08-15 10:45:36 -04:00
ishaanam ec2676becd wallet: unconfirmed ancestors and descendants are always truc 2025-08-15 10:45:36 -04:00
ishaanam e07e2532b4 test: fix anti-fee-sniping off-by-one error 2025-08-01 15:50:12 -04:00
ishaanam aac0b6dd79 test: test sendall and send do anti-fee-sniping 2025-06-25 11:56:07 -04:00
ishaanam 20802c7b65 wallet, rpc: add anti-fee-sniping to send and sendall 2025-06-25 11:55:46 -04:00
ishaanam 7d55796c53 wallet: update mempool conflicts tests + docs 2024-07-01 12:27:43 -04:00
ishaanam 71aae72e1f test: test sendall does ancestor aware funding 2024-05-09 12:49:41 -04:00
ishaanam 5952292133 wallet, rpc: show mempool conflicts in gettransaction result 2024-03-20 15:05:37 -04:00
ishaanam 54e07ee22f wallet: track mempool conflicts
Behavior changes are:
- if a tx has a mempool conflict, the wallet will not attempt to
  rebroadcast it
- if a txo is spent by a mempool-conflicted tx, that txo is no
  longer considered spent
2024-03-20 15:05:34 -04:00
ishaanam d64922b590 wallet refactor: use CWalletTx member functions to determine tx state 2024-03-15 18:03:42 -04:00
ishaanam ffe5ff1fb6 scripted-diff: wallet: s/TxStateConflicted/TxStateBlockConflicted
-BEGIN VERIFY SCRIPT-
sed -i 's/TxStateConflicted/TxStateBlockConflicted/g' src/wallet/wallet.cpp src/wallet/interfaces.cpp src/wallet/transaction.h src/wallet/transaction.cpp
sed -i 's/isConflicted/isBlockConflicted/g' src/wallet/transaction.h src/wallet/wallet.cpp
-END VERIFY SCRIPT-
2024-03-14 17:38:39 -04:00
ishaanam 180973a941 test: Add tests for wallet mempool conflicts 2024-03-14 17:09:59 -04:00
ishaanam 36757941a0 wallet, rpc: implement ancestor aware funding for sendall 2024-02-10 16:38:37 -05:00
ishaanam 544131f3fb rpc, test: test sendall spends unconfirmed change and unconfirmed inputs when specified 2024-02-10 16:38:13 -05:00
ishaanamandariard dced203162 wallet, tests: mark unconflicted txs as inactive
In `blockDisconnected`, for each transaction in the block, look
for any wallet transactions spending the same inputs. If any of
these transactions were marked conflicted, they are now marked as
inactive.

Co-authored-by: ariard <antoine.riard@gmail.com>
2023-05-14 10:45:21 -04:00
ishaanam 1bce12acd3 test: add test for descriptorprocesspsbt RPC 2023-05-06 10:03:25 -04:00
ishaanam fb2a3a70e8 rpc: add descriptorprocesspsbt rpc
This RPC can be the Updater, Signer, and optionally the Input
Finalizer for a psbt, and has no interaction with the Bitcoin
Core wallet.
2023-05-04 13:06:39 -04:00
ishaanamandariard 096487c4dc wallet: introduce generic recursive tx state updating function
This commit also changed `MarkConflicted` and `AbandonTransaction`
to use this new function

Co-authored-by: ariard <antoine.riard@gmail.com>
2023-04-22 09:19:24 -04:00
ishaanam 6e9f8bb050 rpc, tests: in utxoupdatepsbt also look for the transaction in the txindex
Previously only the segwit utxos being spent by the psbt were looked for and
added to the psbt. Now, the full transaction corresponding to each of these
utxos (legacy and segwit) is looked for in the txindex and mempool and added
to the psbt. If txindex is disabled and the transaction is not in the mempool,
then we fall back to getting just the utxo (if segwit) from the utxo set.
2023-03-18 20:58:15 -04:00
ishaanam dbeca792a9 test: fix race condition in encrypted wallet rescan tests 2023-03-15 17:27:57 -04:00
ishaanam 6a5b348f2e test: test rescanning encrypted wallets 2023-02-14 23:32:43 -05:00
ishaanam 493b813e17 wallet: ensure that the passphrase is not deleted from memory when being used to rescan
`m_relock_mutex` is introduced so that the passphrase is not
deleted from memory when the timeout provided in
`walletpassphrase` is up, but the wallet is still rescanning.
2023-02-14 23:32:40 -05:00
ishaanam 66a86ebabb wallet: keep track of when the passphrase is needed when rescanning
Wallet passphrases are needed to top up the keypool during a
rescan. The following RPCs need the passphrase when rescanning:
    - `importdescriptors`
    - `rescanblockchain`

The following RPCs use the information about whether or not the
passphrase is being used to ensure that full rescans are able to
take place:
    - `walletlock`
    - `encryptwallet`
    - `walletpassphrasechange`
2023-02-14 23:31:26 -05:00
ishaanam a5b4883fb4 rpc: extract psbt updating logic into ProcessPSBT
This function is called from utxoupdatepsbt and will be modified
in a following commit to allow for updating inputs with the
`non_witness_utxo` as well.
2023-01-18 20:38:23 -05:00
ishaanam cfe5aebc79 rpc: add minconf and maxconf options to sendall 2023-01-11 17:08:35 -05:00
ishaanam 6f8e3818af sendall: check if the maxtxfee has been exceeded 2022-09-13 18:12:42 -04:00
ishaanam 98ea43d5e9 test: add tests for negative waste during coin selection 2022-07-07 13:05:13 +05:30
ishaanam 6fbb0edac2 Set effective_value when initializing a COutput
Previously in COutput, effective_value was initialized as the absolute
value of the txout, and fee as 0. effective_value along with fee were
calculated outside of the COutput constructor and set after the
object had been initialized. These changes will allow either the fee
or the feerate to be passed in a COutput constructor. If either are
provided, fee and effective_value are calculated and set in the
constructor. As a result, AvailableCoins also needs to be passed the
feerate when utxos are being spent. When balance is calculated or the
coins are being listed and feerate is neither available nor required,
AvailableCoinsListUnspent is used instead, which runs AvailableCoins
while providing the default value for feerate. Unit tests for the
calculation of effective value have also been added.
2022-05-21 11:25:54 -04:00
ishaanam c6122f560b test: use sendall in wallet_taproot.py tests
Fixes #25129 (subtractfeefromamount=true fails with insufficient
funds)
2022-05-17 13:40:15 -04:00
ishaanam bb84b7145b add tests for no recipient and using send_max while inputs are specified 2022-03-29 16:37:49 -04:00