Rusty Russell
8bf33c7839
lightningd/lightningd: daemon for controlling the other daemons.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
a0ac5c276e
status: API for status reporting.
The API formalizes how daemons should report their statuses back to
the main lightningd. It's a simple write API, which includes tracing
support (currently it always sends traces, later it could send iff
there's a failure, for example).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
07fbeee29d
coverage: Added `coverage` makefile target
Added coverage files to `clean` and `coverage` target to generate HTML
report of coverage.
8 years ago
Christian Decker
bd6b9c377e
coverage: Enable compilation with `--coverage`
Setting the environment variable `COVERAGE=1` allows us to turn
coverage measurements on. This produces a number of auxiliary gcno and
gcda files which can then be converted into coverage reports.
I know line coverage and branch coverage is not a perfect metric, but
it might get us some more visibility into where more tests might be
needed.
8 years ago
Rusty Russell
a6f98ad02b
Makefile: wire objects also depend on CCAN headers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
9df0aa7538
libbase58: add autosubmodule rule, move depends to bitcoin/Makefile
The object file should not be built inside the submodule, as that can
confuse git.
Not everything depends on the libbase58 header (CCAN doesn't), so
move that to the everything-else depends line.
The BITCOIN_SRC etc should also move to bitcoin/Makefile, but that's
a bigger change.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Lucas Betschart
3e6bb958eb
Add libbase58 as git submodule
Pointing to the latest release (0.1.4)
8 years ago
Rusty Russell
a08a2105ea
generate-wire.py: generalize, move to tools.
We're going to want to use this for inter-daemon comms, so generalize it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
b7789bf065
Makefile: generalize whitespace check.
Spread to individual Makefiles, and include headers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
751a0ae5cf
check-whitespace: make it quieter.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
0861ec33a5
check-source-bolt: generalize.
This way sub-Makefiles can add their own files to check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
b4f495fe99
check-source-bolt: don't try to check out if BOLTVERSION is empty or unset.
This lets you test against your local version, using:
make check-source BOLTVERSION=
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
6dc7056625
check-bolt: use new BOLTs.
The structure is slightly different, so this requires some fixes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
05feefbb8a
test: move mockup script outside daemon/
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
d30b67a3fe
test: generalize update-mocks
So we can use it in other directories.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
f8eb454139
type_to_string: move pretty printing of types from log
It's not just useful for logging.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
59ecb3dfea
Makefile: don't include tests in TAGS.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
f8344baf64
ccan: update, new modules.
ccan/autodata, ccan/breakpoint, ccan/crypto/hmac_sha256, ccan/crypto/hkdf_sha256,
ccan/fdpass and ccan/io/fdpass.
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
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
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
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
700c536a27
Makefile: remove all the old Elements Alpha support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
d77d5edc07
Makefile: clean gen_ files and ccan/config in make clean.
Not on maintainer-clean; they don't need special tools.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
49809785ca
state.h state_types.h: move into daemon/
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
fd6c3ce5a3
names: move into daemon/
It was already only referred from that Makefile.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
ec072b5d68
gen_pkt_names, gen_state_names: move into daemon/
That's where they're used.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
e40f864567
lightning.pb-c.c lightning.pb-c.h: don't generate if unchanged.
Just like man pages, git can mess us up here.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
6da448b797
0.5: Bitcoin Savings & Trust Daily Interest
Glenn Willen filed plenty of bug reports; he got to name this release.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
d30f3f1a40
sphinx: Remove obsolete onion implementation
8 years ago
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.
9 years ago
Rusty Russell
766249ec2b
Makefile: don't regenerate manpages unless they've really changed.
This is terribly ugly :(
Closes : #36
Reported-by: Glenn Willen
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
4fcdf6de5c
irc: fix check-source.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
5b3bde715a
getinfo: add version information
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
c648897695
Makefile: clean up ccan-enumstr object for make clean.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
2452df315a
doc: manpages for the various lightning RPC calls.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
678df3525e
ccan: update, add cppmagic.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
af8e4ed2b9
ccan: remove unused modules.
These tal submodules got pulled in initially by an overzealous copy.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
c11c81a920
daemon: first unit test, infrastructure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
8d2776376a
0.4: Wright's Cryptographic Proof
Christian Decker moved us to libbase58 and off openssl; he got to name
this release.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
190b30e958
daemon: test restarting.
We add a "dev-restart" command which causes the daemon to close fds
and exec itself. Then we do it after every command, with the caveat
that we always send a commit before newhtlc, because if not committed,
that is forgotten. Fulfillhtlc and failhtlc get resent, since they're
idempotent.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
71b8a07c56
db.c: database API.
These tables could use a rework, as they largely reflect our internal
state. But it's a start.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
3866d7605c
daemon: reconnect support.
To do this we keep an order counter so we know how to retransmit. We
could simply keep old packets, but this is a little clearer for now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
23f9c7c209
permute_tx: don't save permutation map.
We no longer need it anywhere. This simplifies things to the point where
we might as well just not include dust outputs as we go, rather than
explicitly removing them, which gets rid of remove_dust.c as well.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
809caa8588
bitcoin/pullpush.[ch]: expose bitcoin-style marshal/unmarshal.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
ca142a0b47
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago