ThomasV
aaed594772
Simplify invoices and requests.
...
- We need only two types: PR_TYPE_ONCHAIN and PR_TYPE_LN
- BIP70 is no longer a type, but an optional field in the dict
- Invoices in the wallet are indexed by a hash of their serialized list of outputs.
- Requests are still indexed by address, because we never generate Paytomany requests.
- Add 'clear_invoices' command to CLI
- Add 'save invoice' button to Qt
2019-09-12 20:11:20 +02:00
ThomasV
a50f935aec
Restructure invoices and requests (WIP)
...
- Terminology: use 'invoices' for outgoing payments, 'requests' for incoming payments
- At the GUI level, try to handle invoices in a generic way.
- Display ongoing payments in send tab.
2019-09-02 15:35:44 +02:00
SomberNight
9e57a59615
network: handle main_taskgroup dying better. passthrough CancelledError
...
Previously if a task running in the main_taskgroup raised,
main_taskgroup might have never finished as fx.run (another task running
in main_taskgroup) could not be cancelled (it was swallowing the CancelledError).
Need to be careful with catching all Exceptions or BaseExceptions,
as that might result in a coroutine not being cancellable.
Note that from python 3.8 onwards, CancelledError will inherit from BaseException
instead of Exception, so catching all Exceptions is somewhat less horrible
but this will only really matter if we raise the min py version to 3.8...
Really, all "except BaseException" lines are suspect and at least should be
considered for replacement with "except Exception".
-----
regarding fx.run not being cancellable before, and relevant lines, see:
6197cfbb3b/electrum/network.py (L1171)
0decdffce2/aiorpcx/curio.py (L242)
0decdffce2/aiorpcx/curio.py (L199)
0decdffce2/aiorpcx/curio.py (L208)
0decdffce2/aiorpcx/curio.py (L218)
0decdffce2/aiorpcx/curio.py (L221)
6197cfbb3b/electrum/daemon.py (L194)
6197cfbb3b/electrum/daemon.py (L203)
6197cfbb3b/electrum/exchange_rate.py (L507)
6197cfbb3b/electrum/exchange_rate.py (L79)
2019-08-30 19:46:25 +02:00
ThomasV
8010123c08
Display and refresh the status of incoming payment requests:
...
- All requests have an expiration date
- Paid requests are automatically removed from the list
- Unpaid, unconfirmed and expired requests are displayed
- Fix a bug in get_payment_status, conf was off by one
2019-08-22 06:00:45 +02:00
ThomasV
0e8dba897e
lightning:
...
* store invoices for both directions
* do not store lightning_payments_inflight, lightning_payments_completed in lnworker
* payment history is returned by get_payments method of LNChannel
* command line: lightning history, lightning_invoices
* re-enable push_msat
2019-08-20 09:03:11 +02:00
ThomasV
b0d6000771
turn lightning_payments_completed into dict. Show status of lightning payments in GUI. Make 'listchannels' available offline
2019-08-20 09:03:11 +02:00
SomberNight
c02cc9bb3b
persist recent peers. implement dns seed bootstrapping.
...
dns seeds are currently disabled though, as they always seem to return mainnet nodes.
2019-08-20 09:03:10 +02:00
SomberNight
bc06ded4b9
persist nodes in channel_db on disk
2019-08-20 09:03:10 +02:00
SomberNight
a5b44d25b0
persist channel db on disk. verify channel gossip sigs.
2019-08-20 09:03:10 +02:00
SomberNight
8e63471d69
allow paying invoice without amount. min feerate 253 sat/kw.
2019-08-20 09:03:10 +02:00
SomberNight
053c571d74
minor clean-up of prev. util.xor_bytes
2019-08-20 09:03:09 +02:00
nachunjae
8a4e307b78
Update block explorer URL for btc.com ( #5438 )
...
* update block explorer URL for btc.com
2019-06-29 03:54:53 +02:00
SomberNight
9d2b601cc7
update block explorer URL for blockchain.info
...
closes #5408
2019-06-11 19:19:43 +02:00
SomberNight
33308307a4
bip70 payreq: do not show error messages in gui
...
closes #5393
2019-06-05 19:40:33 +02:00
SomberNight
30ffb3d4dc
util: add function "chunks"
...
taken from ElectrumX
67111a3c4c/electrumx/lib/util.py (L149)
2019-05-26 04:10:32 +02:00
SomberNight
158090bf8b
util.parse_URI: more granular exceptions
...
related: #5376
first report in #5376 was generated with these changes;
before, the exception was caught and a toast displayed "Not a Bitcoin URI"
2019-05-25 04:55:36 +02:00
SomberNight
e415c0d930
wallet: (fix) synchronizer would also resub closed wallets...
...
network cb was not removed, so Synchronizer and the wallet itself was
kept in memory; and Synchronizer kept working
2019-05-14 17:04:03 +02:00
SomberNight
104b8804f7
logging: '-V' cli option can blacklist/whitelist classes with short names
...
for example, '-V ni' will whitelist the 'Network' and 'Interface' classes
'-V ^ni' will blacklist those instead
2019-05-07 21:07:18 +02:00
SomberNight
fd5b1acdc8
commands: fix encrypt/decrypt
...
based on Electron-Cash/Electron-Cash@62aa08a0ff
2019-05-03 03:10:31 +02:00
SomberNight
a7b13f4876
logging: make console log lines shorter
2019-05-02 15:19:11 +02:00
SomberNight
6940c424d1
logging: cli options to filter for modules using -v
...
old style "-v" still works
filtering examples:
-v=debug,network=error,interface=error // effectively blacklists network and interface
-v=warning,network=debug,interface=debug // effectively whitelists network and interface
2019-05-02 15:19:10 +02:00
SomberNight
3385a94753
logging: basics
2019-05-02 15:19:03 +02:00
Aleksey Karpov
3d8bcded79
update bitcoin explorer options ( #5285 )
...
removed blocktrail.com, blockr.io, biteasy.com ( this explorers no longer works)
added btc.bitaps.com (mainnet explorer) tbtc.bitaps.com (testnet explorer + coin faucet)
2019-04-24 17:05:11 +02:00
SomberNight
c31fa798c2
util make_aiohttp_session: use longer default timeout
...
same motivation as for 1110f13c62
2019-04-22 03:07:31 +02:00
SomberNight
2adabfd918
kivy: fix history tab fiat values
...
follow-up 46f1fca7c3
2019-04-21 01:55:46 +02:00
SomberNight
1f83711c26
util/Fiat: Fiat(No Data) should equal Fiat(No Data)
...
Decimal('NaN') != Decimal('NaN')
matters in e.g. qt history tab refresh (shortcut)
2019-04-19 20:02:44 +02:00
SomberNight
bdb6d65cf7
fix some DeprecationWarnings
2019-03-27 18:41:42 +01:00
ThomasV
46f1fca7c3
remove currency from amount fields in exported history
2019-03-26 18:35:46 +01:00
SomberNight
1cfac928f9
trustedcoin: longer timeout for server signing
...
fixes #5221
2019-03-25 23:36:52 +01:00
SomberNight
121b8048b0
json_db: store Transaction objects in memory, not raw hex
...
to avoid deserializing the same tx multiple times
2019-03-01 17:59:22 +01:00
ThomasV
7f2083f667
separate storage and database (JsonDB)
2019-02-28 09:02:58 +01:00
SomberNight
4b3a285871
exchange_rate: some clean-up and fixes
...
- generation of currencies.json was broken
- removed some dead exchanges
2019-02-27 21:48:33 +01:00
SomberNight
4ef3eda8da
util: mv create_URI to create_bip21_uri, and small clean-up
2019-02-20 21:19:03 +01:00
SomberNight
38ab7ee554
network: catch untrusted exceptions from server in public methods
...
and re-raise a wrapper exception (that retains the original exc in a field)
closes #5111
2019-02-12 17:02:15 +01:00
ThomasV
b06b8753e6
fix #5088
2019-02-08 12:59:06 +01:00
SomberNight
4fa87d8595
fix: qt icons not available when installed as python package
...
follow-up #5053
2019-02-01 23:32:24 +01:00
SomberNight
16bac5fd73
rm qt icons file
...
so we don't need pyrcc5, which is not deterministic,
and so we don't need the submodule for the icons
based on electrumsv/electrumsv@bf8802c2ea
2019-02-01 20:15:28 +01:00
SomberNight
3ad6f738bd
util: rm hfu, cleaner bh2u
2019-02-01 19:02:02 +01:00
SomberNight
744bfc1eeb
util.profiler: simplify
...
follow-up 6192bfce46
closes #4904
2018-12-20 17:09:58 +01:00
SomberNight
78f5afff74
use certifi directly instead of requests
2018-12-13 23:11:59 +01:00
SomberNight
c09ac41b27
ssl: use certifi explicitly for aiohttp and electrum-server connections
...
fixes ssl issues on Android
2018-12-13 22:54:53 +01:00
SomberNight
ef94af950c
wallet: try detecting internal address corruption
2018-12-12 20:50:53 +01:00
SomberNight
363dd12a2a
qt: try even harder not to crash whole app on first start
2018-12-11 21:29:23 +01:00
SomberNight
65e8eef87f
qt history list: use OrderedDictWithIndex for txns
2018-12-10 09:31:49 +01:00
SomberNight
8bb930dd04
fix OrderedDictWithIndex
...
setitem() would modify the dict of the class. oops.
2018-12-10 09:31:49 +01:00
SomberNight
3c3fac7ca4
qt history list: fix shortcut in refresh()
2018-12-10 09:31:48 +01:00
SomberNight
c017f788ac
wallet: TxMinedInfo (merged TxMinedStatus and VerifiedTxInfo)
2018-12-07 20:47:28 +01:00
SomberNight
cc0db41879
qt history: speed up ensure_fields_available (faster startup)
2018-12-04 22:24:32 +01:00
SomberNight
923a9c36cb
util: Satoshis and Fiat should not be namedtuples
...
undo part of 37b009a342
due to json encoding problems
2018-12-04 16:44:50 +01:00
SomberNight
059beab700
qt history list: small clean-up
2018-12-03 19:12:36 +01:00