Commit Graph

8 Commits

Author SHA1 Message Date
Rusty Russell ecbe671688 peer: keep current commit txs, anchor state, channel funding and their sig.
This lets us implement accept_pkt_anchor().

Also had to predeclare sha256 in commit_tx.h, revealed by the new
includes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:44:27 +10:30
Rusty Russell d95d8a99c2 create_commit_tx: don't use protobufs in the API.
Hand anchor details and pubkeys directly; this is what we want
for the actual daemon which doesn't keep raw packets around.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:41:47 +10:30
Rusty Russell d733e82352 header cleanup: sort include lines into alpha order, after config.h
This makes merging easier in future.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-01-22 06:38:08 +10:30
Rusty Russell a4dfe3ad72 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>
2015-08-07 12:45:30 +09:30
Rusty Russell eac3af06f1 protocol: switch to single-funder anchor model.
Most complex change was gather_updates(), which handles all the "what
is the current state of the channel" logic for our dumb test utils.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-07-29 16:14:28 +09:30
Rusty Russell 3957f1e1c1 update-channel-accept: accept the channel update.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-09 14:13:27 +09:30
Rusty Russell d51f6372aa update-channel: prepare a new tx with modified amounts.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-09 14:13:27 +09:30
Rusty Russell c04d20e019 commit_tx: new file containing logic to create initial commitment transaction.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:44:00 +09:30