Commit Graph

7 Commits

Author SHA1 Message Date
Rusty Russell fe4972fda1 Anchor: apply permutation to get txid.
Otherwise both sides create different anchors.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 14:29:30 +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 393400fa39 Make an explicit bitcoin_txid() call.
Neater than open-coding it.  We still need the raw version for
signatures though.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 13:32:41 +09:30
Rusty Russell bf38ca052e open-commit-sig: create signature for commit tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30
Rusty Russell 63986e5b2d Rename perturb to permute.
Perturb is a bit stretched for this, permute is better.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30
Rusty Russell 3a62a9172d Create bitcoin_tx helper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30
Rusty Russell f43cdf085a Move anchor creation out into its own file.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30