practicalswift
6269a4c55d
Remove unused functions not covered by unit tests
2018-03-26 23:35:56 +00:00
practicalswift
7e9750ffee
Reduce variable scopes
2018-03-26 01:31:21 +00:00
practicalswift
98f49c0837
Remove include in file foo.c that is already included in foo.h
2018-03-25 23:54:21 +00:00
practicalswift
8f76581005
Use pointer to const where possible
2018-03-16 01:17:40 +00:00
Rusty Russell
0a6e3d1e13
utils: remove tal_tmpctx altogether, use global.
...
In particular, we now only free tmpctx at the end of main().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-16 00:16:10 +00:00
John Barboza
7a77271922
lightningd: encode fallback address in 5 bits
...
The bolt11 specification requires that the version number of the
Fallback on-chain address should be 5 bits wide instead of 8
bits.
2018-02-19 02:01:37 +00:00
practicalswift
a87c8a74b5
Avoid segfault on CLI command "decodepay 1111111" (invalid short bech32 string)
...
Before this patch:
```
$ cli/lightning-cli decodepay 1111111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 111111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 11111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 1111111
lightning-cli: Non-object response ''
$ cli/lightning-cli decodepay 1111111
lightning-cli: Connecting to 'lightning-rpc': Connection refused
```
After this patch:
```
$ cli/lightning-cli decodepay 1111111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 111111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 11111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 1111111
"Invalid bolt11: Bad bech32 string"
$ cli/lightning-cli decodepay 1111111
"Invalid bolt11: Bad bech32 string"
```
2018-01-15 19:32:00 +00:00
Rusty Russell
887e9dcc44
travis: reenable check-source (without BOLT text).
...
We've been slipping, so fix up minor issues too so it compiles.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-21 14:33:27 +01:00
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>
2017-12-12 11:45:44 +01:00
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>
2017-12-03 17:06:13 +01:00
Rusty Russell
60c30214c1
bolt11: fix encoding of x and c fields.
...
Fixes : #374
Reported-by: Nadav Ivgi
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-24 13:22:18 +01:00
Rusty Russell
45f5bb7fac
bolt11: move to common/ and sign via callback.
...
JSON stuff is moved to lightningd/invoice.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-24 13:22:18 +01:00