SomberNight
30dcab0877
wallet: allow saving partial txns as local (but require txid)
6 years ago
SomberNight
8e89c0c971
wallet: some clean-up re get_address_history vs db.get_addr_history
...
note: tests needed changing due to behavioural change in wallet.get_receiving_address()
Previously wallet.get_receiving_address used wallet.db.get_addr_history,
now it (indirectly) uses wallet.get_address_history, which now also considers local txns.
6 years ago
SomberNight
8dbbc21aff
wallet: better (outgoing) invoice "paid" detection
...
- no more passing around "invoice" in GUIs, invoice "paid" detection is now handled by wallet logic
- a tx can now pay for multiple invoices
- an invoice can now be paid by multiple txs (through partial payments)
- new data structure in storage: prevouts_by_scripthash
- type: scripthash -> set of (outpoint, value)
- also, storage upgrade to build this for existing wallets
6 years ago
SomberNight
557987d4eb
add/fix some open_channel related type hints
6 years ago
ThomasV
06589df812
simplify add_transaction
6 years ago
SomberNight
6b195437ed
wallet: "future" txns num conf is now negative
...
flipped the sign so that TxMinedInfo.conf can be consistently used in inequalities
6 years ago
SomberNight
8a7c3447b3
tx dialog: try harder to show fee
6 years ago
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
6 years ago
SomberNight
6a32187f01
qt: fix address dialog
...
(was showing full history, not just for addr)
6 years ago
ThomasV
7b828359c6
simplify get_tx_fee
6 years ago
SomberNight
482605edbb
wallet: organise get_tx_fee. store calculated fees. storage version 19.
6 years ago
SomberNight
b138fff9a5
wallet: txi/txo small clean-up
6 years ago
SomberNight
241873f0a4
address_synchronizer.get_history now returns HistoryItem(NamedTuple)s
6 years ago
ThomasV
65b88dca86
return fees in history, show them in kivy GUI
6 years ago
SomberNight
d1dea9343e
wallet: address_is_old minor clean-up
...
also, synchronize was defined twice in AddressSynchronizer
6 years ago
SomberNight
abde8ff169
wallet: fix maturity off-by-one
...
based on Electron-Cash/Electron-Cash@c70957eb131ccb780726c8d01bcbb914df5b9644
6 years ago
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
...
as it seems every consumer wants to know this and has its own hacks to
figure it out
6 years ago
ThomasV
7a51f034e4
add future transactions to address synchronizer
6 years ago
Janus
261fefb6f3
lnwatcher rebased
6 years ago
SomberNight
66817d41f9
lnwatcher improvements
...
- only try sweeping csv-locked to_local if past timelock
- check if outputs are already spent
- no need to keep watching channels for which all outputs are spent and mined deep
6 years ago
SomberNight
7ba3f2d54d
calc short_channel_id after funding locked
6 years ago
Janus
9617447a0f
lnbase: add lnbase_test
6 years ago
SomberNight
e431a07258
fix prev: conditional import / type hint failure
7 years ago
SomberNight
d293b2e038
wallet: follow-up prev
7 years ago
ThomasV
37e7add776
Do not pass storage to address_synchronizer
7 years ago
SomberNight
e3c26d7c7a
json_db: fix remove_spent_outpoint
...
method should make sure prevout_n is str...
also wrote failing test
7 years ago
SomberNight
53d189fc7a
storage: fix some madness about get_data_ref() and put() interacting badly
...
previously load_transactions() had to be called before upgrade();
now we reverse this order.
to reproduce/illustrate issue, before this commit:
try running convert_version_17 and convert_version_18
(e.g. see testcase test_upgrade_from_client_2_9_3_old_seeded_with_realistic_history)
and then in qt console:
>> wallet.storage.db.get_data_ref('spent_outpoints') == wallet.storage.db.spent_outpoints
False
>> wallet.storage.db.get_data_ref('verified_tx3') == wallet.storage.db.verified_tx
False
7 years ago
SomberNight
0e6cf153d7
synchronizer: show progress in GUI
7 years ago
SomberNight
06cff9ac10
logging: fix call with multiple args
7 years ago
SomberNight
3385a94753
logging: basics
7 years ago
SomberNight
bca6ad5241
verifier: fix logic bug. after reorg, some verifs were not undone
...
after a reorg, in a many fork/orphan chains scenario,
we would sometimes not undo SPV for enough blocks
functions in blockchain.py somewhat based on kyuupichan/bitcoinX@5126bd15ef0c9ba36e17a455513452ebed7b2328
7 years ago
SomberNight
752c518bdc
add option to freeze individual UTXOs
...
based on cculianu's work in Electron-Cash/Electron-Cash@fd910cffc88570f82613fefeb932966cde0246ad
7 years ago
SomberNight
cd40f2c9b7
trivial wallet clean-up
7 years ago
SomberNight
2abc4f6334
wallet: cache get_addr_balance
...
notably this makes get_history faster; as 40% of the time is spent in
get_addr_balance (without the cache)
7 years ago
SomberNight
514d0ae958
wallet: towards restoring previous performance 2
7 years ago
SomberNight
ef1330df5d
[trivial] use namedtuple field by name
7 years ago
SomberNight
2ad73050b3
wallet: towards restoring previous performance
7 years ago
ThomasV
1e519f2dd0
json_db: make get operations threadsafe
7 years ago
ThomasV
d74f0c0947
storage_db: fix tests, add modified flag to db class
7 years ago
SomberNight
4b36114d0d
small fixups
7 years ago
ThomasV
791e680a96
abstract database away from wallet and address_synchronizer
7 years ago
SomberNight
40bf049c82
commands: introduce 'removelocaltx'
...
see #5137
7 years ago
SomberNight
8e6904c7b7
wallet: default to get_addresses() in get_history()
...
get_addresses() is a superset of history.keys()
(was missing some local transactions in the output of get_history())
7 years ago
SomberNight
9bbea9bf2f
wallet: implement wait_for_address_history_to_change API
7 years ago
SomberNight
7ffd928e80
wallet: add comment
7 years ago
SomberNight
c9482b5ea2
fix prev
7 years ago
SomberNight
c017f788ac
wallet: TxMinedInfo (merged TxMinedStatus and VerifiedTxInfo)
7 years ago
SomberNight
960855d0aa
wallet history fees: only calculate fees when exporting history
...
it's expensive, and it slows down startup of large wallets a lot
7 years ago
SomberNight
e12af33626
wallet: cache more in get_tx_fee
...
closes #4879
7 years ago
SomberNight
5376d37c24
history export: include tx fee
...
closes #3504
7 years ago