Christian Decker
a005bce155
wallet: Adding primitives to save/load invoices to wallet
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
b4732f6091
wallet_tests: Testing the rewiring of loaded htlcs
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
e162a53e86
wallet_tests: Enable logging in the unit tests
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
eb5ed961ed
wallet: Added loading of HTLCs from the database
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
b8fa765c3f
wallet: Add primitives to store htlcs in the database
Signed-off-by: Christian Decker <decker.christian@gmail.com>
7 years ago
Christian Decker
4bc0750882
wallet: Moving wallet_channel->peer_id into the peer struct
This was supposed to be a temporary solution anyway, and I had a
rather annoying mixup between peer_id and unique_id, the latter of
which is actually a connection identifier.
7 years ago
Rusty Russell
1ffb9f07c1
ccan: update to latest shachain.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
893335244d
openingd: supply initial tx as well as signature.
And store in peer->last_tx/peer->last_sig like all other places,
that way we broadcast it if we need to.
Note: the removal of tmpctx in funder_channel() is needed because we
use txs[0], which was allocated off tmpctx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
c389215a35
closingd: send the tx to master as we negotiate.
We can derive fees from this, and also broadcast at any time without
having to reconstruct it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
dbfac68c3f
lightningd: keep last valid tx, and its signature.
This avoids us having to reconstruct it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
1ac10716be
wallet: Add closing parameters to channel state
I must have missed these before, so adding them now.
7 years ago
Christian Decker
1070bbccde
wallet: Add channel_config persistence to channel persistence
Signed-off-by: Christian Decker <decker.christian@gmail.com>
8 years ago
Christian Decker
f2382884b6
wallet: Add roundtrip test for channel_config persistence
Signed-off-by: Christian Decker <decker.christian@gmail.com>
8 years ago
Christian Decker
6f441d3cd2
wallet: Add a CRU(D) test for wallet_channels
Simple roundtrip testing which writes to DB, reads it back in and
checks for equality.
8 years ago
Christian Decker
8b7efd01d7
wallet: Created a simple persisted shachain unit-test
This exercises the create, read and update functionality of the
persisted shachain.
8 years ago
Christian Decker
bdb6b1002f
wallet: Reserve UTXOs used in build_utxos
8 years ago
Christian Decker
5396335363
wallet: Add wallet_tests and simplify db_tests
I'll eventually move the utils into a different location (maybe CCAN?)
but for now I'm keeping it close to where it is used.
8 years ago