Rusty Russell
20bb6c65aa
protocol fix: use locktime from *other* side.
...
Which emerged clearly when setting one side's locktime differently than
the other.
Each side specifies the (minimum) time they need to notice a fraud attempt:
this constrains the *other* side.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-07-03 10:44:49 +09:30
Rusty Russell
20624c049f
tx: prepare for Elements Alpha.
...
They sign, hash, and serialize differently.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-07-01 16:27:45 +09:30
Rusty Russell
6389dbd455
protocol: restore locktime in blocks option.
...
This could be used by an always-on node to agressively shorten their timeouts.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-12 13:06:33 +09:30
Rusty Russell
ef9463f6b1
Sort include lines (ignoring hacky cli test utils).
...
Put ccan first, openssl next, then standard headers, then locals.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-12 12:41:28 +09:30
Rusty Russell
442f321585
Move protobuf<->bitcoin converters out of bitcoin/
...
They're lightning-specific.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-12 12:35:42 +09:30
Rusty Russell
612d713470
Move bitcoin stuff into bitcoin subdir.
...
It's not very interesting if you're looking for LN code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-12 12:35:42 +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
4dd6b8e385
lightning.proto: Rename 'to_me' to 'final', use for commit_tx.
...
This is where the commit tx outputs should pay to.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-08 06:29:15 +09:30
Rusty Russell
29d0cdc3cd
open-channel: use pubkey, not arbitrary script for final outout address.
...
We need to pay to this from two places: on their side, it's a simple
payment, on our side, it's a complex timeout-or-mutual-or-hval script,
which doesn't lend itself to arbitrary scripts.
Use P2SH, of course.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-05 11:37:27 +09:30
Rusty Russell
316f29cb69
bitcoin_script: wean entirely off protobuf types.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 13:38:38 +09:30
Rusty Russell
f911b2b6df
Use pubkey structures in bitcoin_script, rather than protobufs.
...
This ensures we do checking beforehand, and keeps abstractions clear.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 13:33:21 +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