Rusty Russell
20d7ddcb6e
json_fund_channel: give more details than "peer died".
Rather than using the destructor, hook up the cmd so we can close it.
peers are allocated off ld, so they are only destroyed explicitly.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
a0724f45af
routing: Do not set an empty channel_announcement if none is given
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
4a51de44c0
gossip: Forward when we don't have a valid node_announcement yet
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
580a2612fd
routing: Add local and sigfail to trace when receiving cannounce
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
ba45ccffd8
routing: Return boolean from handle_channel_announcement
This will later be used to determine whether or not we should announce
ourselves as a node.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
b5f737e563
gossip: Passing alias, color and wireaddrs through to gossipd
First step towards `gossipd` managing the `node_announcement`.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
67c6d4d1f1
opts: Change alias to be u8*, better matches the unicode nature
We are still generating only char* style aliases, but the field is
defined to be unicode, which doesn't mix too well with char.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
19c030ea1f
routing: Make routing_state aware of its own ID
This is used to identify our own announcements.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
8d6281175d
gossip: Remove HSM_FD from handshake
7 years ago
ZmnSCPxj
4022fc0034
wallet.c: Minor leak in wallet_invoices_load.
7 years ago
ZmnSCPxj
44c37b60e4
Add test for withdrawing to P2WPKH and P2WSH.
7 years ago
ZmnSCPxj
e26d294b60
Add support for withdrawing to BECH32 addresses.
Fixes : #428
7 years ago
ZmnSCPxj
8512e2c8ef
README.md: Add link to waitanyinvoice
7 years ago
Rusty Russell
bbbbb60863
wallet: don't leak string on update.
We actually don't need tal_fmt() here at all, anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
5a319c781c
wallet: don't leak UTXO array on extracting outputs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
9747d1a62c
database: don't leak query string.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
65fd7ce132
bitcoind: don't leak memory on every call to bitcoin-cli.
Fixes : #412
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
b00525b8c8
options: don't leak memory when people override options.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
005f3826c9
wallet/tests: add mocks for futureproofing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
2931760b5b
wallet: move tests into test/ dir like other unit tests.
Trivial move, but makes it easy to add new ones.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
ZmnSCPxj
757d45c8a3
Test withdrawal to P2SH address.
7 years ago
ZmnSCPxj
9842898ca4
Add support for withdrawing to P2SH addresses.
7 years ago
ZmnSCPxj
d43fb87871
Factor out scriptpubkey_from_address function from json_withdraw.
7 years ago
ZmnSCPxj
9f481226fa
Rearrange checking of withdrawal address parsing success in json_withdraw.
7 years ago
ZmnSCPxj
b56fea8b2a
Modify hsm_sign_withdrawal to transmit scriptpubkey to withdraw to, rather than pkh.
7 years ago
ZmnSCPxj
5fd74f9933
Change withdraw_tx to accept scriptpubkey rather than plain address.
7 years ago
Rusty Russell
0610f66c34
bolt11: handle r value fee spec change.
We don't use it yet, but now we'll decode correctly.
See: https://github.com/lightningnetwork/lightning-rfc/pull/317
lightning-rfc commit: ef053c09431442697ab46e83f9d3f86e3510a18e
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
e9f9721ed3
devtools/bolt11-cli: handle hashed descriptions
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
34444a99f9
docker: Added clang to build dependencies
7 years ago
Christian Decker
7572c22a26
travis: Add clang build to build matrix
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
61852b4603
cleanup: Use check_act* in handshake and remove unused static inline
This was tripping up `clang`.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
practicalswift
486d321094
Avoid NULL pointer dereference in channelseq(...)
7 years ago
practicalswift
4452e3f3f1
Remove redundant code
7 years ago
practicalswift
0353ec0983
Remove trailing whitespace
7 years ago
ZmnSCPxj
7c09b6f478
Load defaults for purpose of help.
7 years ago
ZmnSCPxj
f0fa01b439
Share similar code between bitcoin_witness_p2sh_p2wpkh and bitcoin_scriptsig_p2sh_p2wpkh.
Note that bitcoin_witness_p2sh_p2wpkh is not actually used in current
code.
7 years ago
practicalswift
307e8c0180
Avoid NULL pointer dereference when new_initial_channel(...) fails
7 years ago
ZmnSCPxj
38fc280fad
Make json_withdraw check testnet flag.
bitcoin_from_base58 returns a testnet flag, but json_withdraw
did not actually check it. Add a basic check that the given
withdraw address belongs to the same net lightningd is using.
7 years ago
practicalswift
2ed53025f9
Remove redundant remote_shutdown_scriptpubkey assignment
7 years ago
practicalswift
b5c8b9b9b3
Add build artefacts generated during "make"/"make check" to .gitignore
7 years ago
practicalswift
61c47c09d0
Fix typos
7 years ago
Rusty Russell
5444084625
onchaind: fix reversed CSV delays.
Our config -> their CSV delay, their config -> our CSV delay.
Fixes : #395
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
af5dbbc9f8
json_connect: separate port arg so we can parse IPv6 addresses.
Fixes : #391
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
0069787eb6
lightningd: fix crash on bad connect host arg.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
45e9f35988
docs: Note that we need 0.15 (for estimatesmartfee with CONSERVATIVE/ECONOMCIAL flags)
Closes : #392
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
9ba99d2b2d
hsm: Cleanup after merging control and client libraries
Change all calls to use the correct serialization and deserialization
functions, include the correct headers and remove the control
messages.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
2d9cd4759e
hsm: Make the master simply a client with special capabilities
7 years ago
Christian Decker
8ff69e0307
hsm: channeld now also just uses the handle_client entry point
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
6ce264d3a2
hsm: Remove special case of hsmfd_ecdh, replaced with client and cap
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
5482acb837
hsm: Unifying the client creation and adding client capabilities
We had a number of entry points into the HSM, all with different
behavior, so this is my attempt at unifying the way we handle
clients. Every client, except master, now takes the same path entry
point to the HSM and we use capability bit flags to indicate whether
the client is allowed to execute a set of operations.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago