Rusty Russell
37670c04e0
test_lightning.py: disable test which needs bitcoind 0.16 (for now!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
b2cec18a81
contrib: Add the addrtype argument to newaddr
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
William Casarin
3d27bbb47d
test: test_bech32_funding
1. Test wallet funding to a bech32 p2wpkh address
2. Test channel opening with this address
Signed-off-by: William Casarin <jb55@jb55.com>
7 years ago
William Casarin
0e59e091e7
test: switch invoice tests to use proper bip173 name
Signed-off-by: William Casarin <jb55@jb55.com>
7 years ago
William Casarin
b30fb952e6
chainparams: fix regtest bip173_name
regtest bech32 hrp is bcrt, not tb
Signed-off-by: William Casarin <jb55@jb55.com>
7 years ago
William Casarin
37ea24e9c9
newaddr: support bech32 p2wpkh funding addresses
* Add optional addresstype param to newaddr, which can be one of:
- bech32
- p2sh-segwit
- nothing (defaults to p2sh-segwit)
The naming here mirrors bitcoind
* txfilter already looks for p2wpkh outputs, so we're covered there
Signed-off-by: William Casarin <jb55@jb55.com>
7 years ago
Christian Decker
4fd7e26bf7
wallet: Re-introduce change assertion for withdrawals
This was removed because withdraw-to-self results in more than the
change being sent to us.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Wladimir J. van der Laan
b2abe0d250
gossipd: Move include of time.h to routing.h
Commit a57a2dcb86
introduced a time_t
in routing.h. So also move the time.h include to the header. This
fixes the build on FreeBSD.
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
7 years ago
Wladimir J. van der Laan
1ef79854c3
lightningd: Don't crash when libunwind backtrace not available
libunwind does not accept a NULL parameter for the error callback. It
will simply call into the NULL pointer. So add an error callback.
This makes the crash output somewhat more sensible on FreeBSD, where
there is no libunwind stack trace available:
2018-02-05T20:24:50.598Z lightningd(75556): error getting backtrace: no stack trace because unwind library not available (0)
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
7 years ago
Christian Decker
7dd19d5b93
gossipd: Cleanup and less verbose on deferred node_announcements
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
f6c9c4fc3a
gossipd: Use channels map to lookup pending cannouncements
Iterating over lists is so 1980s
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
b09666c51c
gossip: Remember the channel_update broadcast index
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
81551b2e60
pytest: Increate timeout when waiting for gossip
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
0790d9b52f
gossip: Add a map for pending node_announcements
We were dropping these on the floor while checking for txout. So now
we add a map that holds announcements while we are checking.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
35b44d5294
gossip: Remember which broadcast index the node_announcement had
Avoids searching for it in the uintmap.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
24d52ec23a
gossip: Only replace with newer updates while txout check is pending
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
739e78a8c7
gossip: Reduce verbosity
Now we only report serious failures, or messages that actually changed
the local view.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
fa069d7d97
gossip: Use the channels map to look up by scid
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
a88076b1b0
gossip: Adding locally added channels to channels map
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
26b5588656
gossip: Use replace_broadcast when enqueuing a channel_announcement
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
01b7e2a7c0
broadcast: Added option to replace a specific index
We are wasting way too much time looking for announcements and updates
in the broadcast. We can just hint where to find the message to be
evicted and safe the traversal.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
60ab947a2f
gossip: Add new channels to channels map
Adding channels that we are currently verifying to the map, and
skipping if we already have a channel at that position.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
d7224e2178
gossip: Added short_channel_id_to_uint for uintmap index
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
0bc2f8714d
gossip: Added uintmap based channels map, indexed by scids
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Igor Cota
a0dffc7be2
Fix listpeers JSON command description
7 years ago
Sjors Provoost
e4d719a421
[doc] install: add libsodium-dev
7 years ago
ZmnSCPxj
ba24fe0ba3
doc: Update manpage for waitinvoice.
7 years ago
ZmnSCPxj
0925e404d6
test_lightningd.py: Test new expiration system in more detail.
7 years ago
ZmnSCPxj
532833cd78
invoice: Return the invoice as a detailed error on expiration
7 years ago
ZmnSCPxj
59abc37258
invoices: Add expiration timer system.
Fixes : #502
Changes behavior of waitinvoice API!!
7 years ago
ZmnSCPxj
9af923b6d0
wallet: Minor reorganization of struct invoice members.
7 years ago
ZmnSCPxj
1e6747c28e
wallet: Pass in timers object during construction.
In preparation for expiration.
7 years ago
Rusty Russell
8be1c1df32
Updates for changed external/jsmn API change.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
4d58b12255
external/jsmn: update module to see if bug is fixed
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
ZmnSCPxj
f21cb57d27
pay: Also treat nonexistent peer as immediate routing failure.
7 years ago
ZmnSCPxj
a57a2dcb86
routing: Only mark channel unroutable for a short time.
Fixes : #867
7 years ago
ZmnSCPxj
89663454c8
routing: Factor out function to determine if we can route through a channel.
7 years ago
Rusty Russell
de0777cb2c
Fix weight calculation, rename cost->weight.
Reported-by: Jon Griffiths
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
windsok
26957fce07
update max-locktime-blocks description to be accurate
7 years ago
windsok
93d5df559d
add docs about configuration file
7 years ago
gdassori
326b17a1be
add readme badge
7 years ago
ZmnSCPxj
4255e4186d
HACKING: Add subtleties.
7 years ago
ZmnSCPxj
5f2cd7c11e
pay: Report routing failure on immediate fail of send_htlc_out.
7 years ago
ZmnSCPxj
d14efde4bc
pay: Refactor logging into report_routing_failure.
7 years ago
ZmnSCPxj
4ef168cd97
jsonrpc: Properly report code for detailed errors.
7 years ago
ZmnSCPxj
4ac5d123d6
test_lightningd: Test missing arguments.
7 years ago
ZmnSCPxj
5b304fce4f
jsonrpc: Let freeing of `cmd` free `names`
Fixes : #885
7 years ago
ZmnSCPxj, ZmnSCPxj jxPCSmnZ
ddf052982a
routing: Correct the sense of "PERM bit is NOT set"
7 years ago
Saibato
7dcaf27bf5
allow --rpc-file option to change default value
short onliner as rustyrussel suggested
7 years ago
practicalswift
98372e4c0a
Mark last parameter of log_to_stdout(...) as intentionally unused
7 years ago