mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-03 21:24:22 +01:00
channel_state: encapsulate funding of channel in one place.
This shows where funds are going at any time (fees vs to each side). funding.c is mainly rewritten, and should be clearer now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
|
||||
u8 *redeemscript;
|
||||
struct sha256 rhash;
|
||||
size_t p2sh_out;
|
||||
u64 fee = 10000, our_amount, their_amount;
|
||||
u64 fee = 10000;
|
||||
u32 locktime;
|
||||
|
||||
err_set_progname(argv[0]);
|
||||
@@ -82,9 +82,8 @@ int main(int argc, char *argv[])
|
||||
errx(1, "Invalid o2 final pubkey");
|
||||
|
||||
/* We use this simply to get final revocation hash. */
|
||||
gather_updates(o1, o2, a, commit_fee(o1, o2), argv + 7,
|
||||
&our_amount, &their_amount,
|
||||
&rhash, NULL, NULL);
|
||||
gather_updates(ctx, o1, o2, a, commit_fee(o1, o2), argv + 7,
|
||||
NULL, &rhash, NULL, NULL);
|
||||
|
||||
/* Create redeem script */
|
||||
redeemscript = bitcoin_redeem_secret_or_delay(ctx, &pubkey1, locktime,
|
||||
|
||||
Reference in New Issue
Block a user