bitcoin/src/wallet
Andrew Chow e30b6ea194
Merge bitcoin/bitcoin#24067: wallet: Actually treat (un)confirmed txs as (un)confirmed
fac8165443 Remove unused checkFinalTx (MarcoFalke)
fa272eab44 wallet: Avoid dropping confirmed coins (MarcoFalke)
888841ea8d interfaces: Remove unused is_final (MarcoFalke)
dddd05e7a3 qt: Treat unconfirmed txs as unconfirmed (MarcoFalke)

Pull request description:

  The wallet has several issues:

  ## Unconfirmed txs in the GUI

  The GUI clumsily attempts to guess if unconfirmed txs are locked until a future time. This is currently based on the locktime only, not nSequence, thus wrong. Fix this by removing the clumsy code and treat all unconfirmed txs as unconfirmed. The GUI already prints whether a tx is in the mempool, in which case the user knows that the tx wasn't locked until a future time. If the tx is not in the mempool, it might be better to report the exact reject reason from the mempool instead of using incorrect heuristics.

  ## Confirmed txs in the wallet

  The wallet drops coins that it incorrectly assumes to be locked until a future time, even if they are already confirmed in the chain. This is because the wallet is using the wrong time (adjusted network time) instead of MTP, due to the `-1` default argument of `CheckFinalTx`.

  The issues are fixed in separate commits and there is even a test.

ACKs for top commit:
  achow101:
    ACK fac8165443
  prayank23:
    reACK fac8165443
  glozow:
    code review ACK fac8165443, I understand now how this fixes both issues.

Tree-SHA512: 210afb855f4c6d903fee49eba6b1a9735d699cf0168b669eabb38178e53b3a522258b7cc669f52489c6cd3e38bf358afde12eef3ba2e2f2ffaeb06b8f652ccd0
2022-01-25 16:17:51 -05:00
..
rpc Merge bitcoin/bitcoin#24067: wallet: Actually treat (un)confirmed txs as (un)confirmed 2022-01-25 16:17:51 -05:00
test wallet: Allow user specified input size to override 2022-01-24 11:23:31 -05:00
bdb.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
bdb.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coincontrol.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coincontrol.h wallet: add input weights to CCoinControl 2022-01-24 11:23:31 -05:00
coinselection.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coinselection.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
context.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
context.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
db.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
db.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
dump.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
dump.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
external_signer_scriptpubkeyman.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
external_signer_scriptpubkeyman.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
feebumper.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
feebumper.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
fees.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
fees.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
interfaces.cpp interfaces: Remove unused is_final 2022-01-14 11:28:45 +01:00
ismine.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
load.cpp fs: Make compatible with boost 1.78 2022-01-19 16:25:20 -05:00
load.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
receive.cpp wallet: Avoid dropping confirmed coins 2022-01-25 10:15:12 +01:00
receive.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
salvage.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
salvage.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
scriptpubkeyman.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
scriptpubkeyman.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
spend.cpp Merge bitcoin/bitcoin#24067: wallet: Actually treat (un)confirmed txs as (un)confirmed 2022-01-25 16:17:51 -05:00
spend.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
sqlite.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
sqlite.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
transaction.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
transaction.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallet.cpp wallet: Allow user specified input size to override 2022-01-24 11:23:31 -05:00
wallet.h wallet: Allow user specified input size to override 2022-01-24 11:23:31 -05:00
walletdb.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletdb.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallettool.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallettool.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00