Christian Decker
db481d881a
proto: Added handling for nested packets
8 years ago
Christian Decker
1c4d4f8c91
proto: Added nested_pkt
This is mainly used to transport the new, standardized protocol, over
the old legacy transport. Allows us to replace the serialization and
transport gradually instead of all at once.
8 years ago
Christian Decker
811fab4850
trivial: Add `addresses` field to generate-wire.py
It was failing the compile if we had a recent enough spec.
8 years ago
Rusty Russell
a44e4fb631
daemon/json, test/test_protocol: avoid gcc -O warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
e109977df7
peer: don't print uninitialized commit_num.
Reported-by: Lucas Betschart <lucasbetschart@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
2a68a984c3
peer: fix unassigned error packet on receiving non-ASCII error.
Reported-by: Lucas Betschart <lucasbetschart@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
1b170c85bb
Revert "Fix -Wsometimes-uninitialized and -Wuninitialized"
This reverts commit ff9cdda4fa
.
These are real bugs, so I prefer to fix them explicitly.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Lucas Betschart
900ab78d46
Fix -Wtautological-constant-out-of-range-compare
8 years ago
Lucas Betschart
ff9cdda4fa
Fix -Wsometimes-uninitialized and -Wuninitialized
8 years ago
Lucas Betschart
c163fe04ac
Fix -Wenum-conversion
8 years ago
Lucas Betschart
33d6cbe6bc
Fix -Wgnu-variable-sized-type-not-at-end
8 years ago
Christian Decker
37fcd15e95
Merge pull request #101 from cdecker/gitlab-ci
ci: Replacing Travis-CI with Gitlab-CI
8 years ago
Christian Decker
001708b115
travis-ci: Removing travis-ci config
We are replacing this with an internally run gitlab-ci instance, so no
need to keep this file.
8 years ago
Christian Decker
12b9d6db22
Add .gitlab-ci.yml
8 years ago
Rusty Russell
45ec071e58
lightningd: remove whitespace failing make check-source.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
36c8fc7ef8
lightningd: remove secpctx
Use the global in the few remaining places.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
a4fdaab5b3
Use global secp256k1_ctx instead of passing it around.
If I'd known how large this patch would be (though trivial), I'd
have done it in parts.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
c938ebb5c0
utils: add a global secp, fix wire to use it.
This repairs make check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
1f447688bc
test: make generic driver for unit tests.
Not just in daemon. This fixes 'make check' when it tries to
run 'make wire-tests'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
ca9fb0376a
wire: Removing global secpctx
Changed the generation of messages so that we pass in a reference to the
secp256k1_context if it is required by the underlying primitive
function. This gets rid of the global `secp256k1_ctx` variable and
adheres closer to how we've been handing in the context so far.
8 years ago
Christian Decker
e40509c6c3
wire: Linking against wire objs
8 years ago
Rusty Russell
36e018161f
wire: generate marshal/unmarshal from spec.
Including tests!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
f85f2c6c2d
0.5.2: Fixes and change IRC server.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
6905cf5e7f
README.md: add "upgrade" instructions and add port config for public nodes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
0ba93cb948
lightningd: don't listen at all if no port number set.
When we support the Milan protocol, we'll use a default port. But
for now, don't listen at all unless a port is specified.
Fixes : #54
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
fe14b3f4d9
Merge remote-tracking branch 'origin/pr/92'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
97a155bad5
Merge remote-tracking branch 'origin/pr/97'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
42a33df42e
irc: Checking for param count before accessing
8 years ago
Christian Decker
188b3c3e19
sphinx: Fixed a buffer overflow in hmac generation
Our HMACs are truncated to 20 byte, but sodium still generates 32 byte
HMACs and we were handing in a buffer that was too small, so we
overflowing the buffer by 12 bytes. This manifested itself only in the
32 bit variant because of different alignment in the 64bit version.
Fixes #94 .
Signed-off-by: Christian Decker <decker.christian@gmail.com>
8 years ago
Christian Decker
b2a3e8010f
Merge pull request #96 from ElementsProject/minor-sphinx-cleanups
Minor sphinx cleanups
8 years ago
Christian Decker
bf81f7af15
Merge pull request #93 from ElementsProject/fix-87-open-too-small-for-fee
json_connect: don't try to double-fail if amount insufficient.
8 years ago
Christian Decker
1126499a10
Merge pull request #95 from ElementsProject/fix-91-32-bit
Fix #91 32 bit build
8 years ago
Rusty Russell
41299b679c
sphinx: process_onionpacket doesn't modify the packet.
Make it const.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
423572190b
sphinx: use assignment instead of memcpy where possible.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
6f9dedbe7f
sphinx: remove redundant initialization
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
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>
8 years ago
Rusty Russell
88837c20ca
Makefile: pass CC through to libsecp256k1 build.
For CC="gcc -m32" in particular.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
5465b61784
json: fix 32-bit build.
Assume we have strtoull everywhere (it's C99 and was common before).
Fixes : #91
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
686ff6edef
irc: Switched to LFNet.org IRC server
This is a temporary fix until we finish #88 .
8 years ago
Rusty Russell
94adbd241d
json_connect: don't try to double-fail if amount insufficient.
Closes : #87
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
34b4134cb0
bugfix: Removed spurious printf in peer.c
I must've left that on in. Fixes #89
8 years ago
Christian Decker
e5b44ff232
Merge pull request #85 from ElementsProject/whitespace
Whitespace
8 years ago
Christian Decker
2d6a98ee1f
Merge pull request #45 from cdecker/travis-ci
Adding Travis-CI configuration
8 years ago
Christian Decker
9848b4ac3e
travis-ci: Added travis-ci config
Added .travis.yml to get travis-ci to build and run tests for us.
In addition this fixes a flaky test due to the fact that when lightning2
connects to lightning3 and we tell lightning3 to restart, then
lightning2 will back-off its reconnection attempts, potentially causing
a timeout to trigger during tests. This was triggered by travis-ci
relatively consistently since the restart would take quite some
time. Now simply restarting them in reverse order and a small timeout
seems to fix this consistently.
8 years ago
Rusty Russell
0d7f6ce25b
check-whitespace: add to check-source.
We don't check submodules (daemon/jsmn), or imported files (ccan/ secp256k1/)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
f5c00deec7
Remove trailing whitespace from source.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
98910c03f2
check-source: add version to BOLTDIR.
This allows us to have different rfcs in different branches, which we're
going to need soon.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
716da21f85
chaintopology: reduce how far back we start on testnet.
When initially reading the blockchain, we start 100 back from the
current block, or at the first block with a funding transaction,
whichever is earlier.
This slows testing slightly, so use whatever the "forever" value is
(10 on testnet, still 100 on mainnet).
make check -j12 times:
Before: 7m52.005s
After: 6m31.896s
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
ce96812ef0
test.sh: split into multiple scripts.
This significantly reduces re-testing of the same paths, and simplifies
the addition of new tests.
make check -j12 times:
Before: 9m24.973s
After: 7m52.005s
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
fae7f68731
helpers.sh: make check_tx_spend able to check for a specific transaction.
It currently takes an unused "who to blame" argument, which doesn't
always make sense.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago