Rusty Russell
6f9dedbe7f
sphinx: remove redundant initialization
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-16 14:04:50 +10:30
Rusty Russell
8599d63256
sphinx: add brackets around constant definition
...
Always do this, otherwise "MACRO * foo" can have unexpected results.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-16 14:02:56 +10:30
Rusty Russell
8949290794
Merge remote-tracking branch 'origin/pr/66'
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-05 13:48:38 +10:30
Rusty Russell
feecabacce
sphinx: fix marshalling/unmarshalling
...
Unfortunately, this fix will break compatibility.
Found by PVS Studio.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-04 12:09:31 +10:30
Rusty Russell
a902193874
sphinx: don't leak, especially on failed onion.
...
Generally, the pattern is: everything returned is allocated off the return
value, which is the only thing allocated off the context. And it's always
freed.
Also, tal_free() returns NULL, so it's useful for one-line error
cleanups.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-04 11:17:04 +10:30
Rusty Russell
af9ee44d52
sphinx: memset warning suppression workaround.
...
Milan summit finalized some changes, so this will be reworked
soon anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-10-17 12:44:09 +10:30
Christian Decker
7bb5c279a8
sphinx: Implemented sphinx onion routing
...
Implements a spec-compliant sphinx onion routing format. The format has
been cross-checked with the go implementation
cdecker/lightning-onion@b9e117e .
2016-10-16 16:40:43 +02:00