Commit Graph

11 Commits

Author SHA1 Message Date
Rusty Russell fc8552318a opt_bits: parsing routines for 'bits' == 100 satoshi.
Also fix open-channel usage message.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-07 13:52:04 +09:30
Rusty Russell ca18eeeaa7 open-channel: fix revocation hash.
Revocation hash is SHA256 of output of generator.  Sometimes
that is the same as the next revocation hash (on even counts), but
not otherwise.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-05 17:13:26 +09:30
Rusty Russell 6048a15db9 bitcoin_tx: bitcoin_txid_from_hex helper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-05 17:13:26 +09:30
Rusty Russell d30c470c7d anchor: change is not an arbitrary output, but a pubkey we p2sh to.
Gets rid of the last pubkey user; they're generally deprecated.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-05 17:13:26 +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 50609c6771 open-channel: expect hex txids to be in LE (ie. reversed!) order.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-04 14:46:12 +09:30
Rusty Russell a6d1c65683 Use new opt_usage_exit_fail().
opt_usage_and_exit() exits with status 0, and prints to stdout.
This exits status 1 and prints to stderr.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-04 14:15:19 +09:30
Rusty Russell 07c7214edb Explicit pubkey structure.
This checks that the protobuf is the right form, also handles uncompressed
keys (though you shouldn't be using those any more, should you?)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 11:53:59 +09:30
Rusty Russell 8ff6b74e05 open-channel: restore the --commitment-fee option.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30
Rusty Russell 670670f138 open-anchor-sig, many fixes for open-channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-29 10:51:16 +09:30
Rusty Russell 81ac81e699 Rename openchannel to open-channel.
Since I'm about to write create-anchor, which definitely needs a separator.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-26 14:14:19 +09:30