proto_to_locktime: abs and relative locktime handlers.

Our current proto_to_locktime actually handles relative locktimes,
and HTLCs use absolute.  Fix that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-08-07 12:45:30 +09:30
parent 7f21695a63
commit 9a0163ec85
5 changed files with 23 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
if (!proto_to_pubkey(theirs->final_key, &theirkey))
return tal_free(tx);
if (!proto_to_locktime(theirs->delay, &locktime))
if (!proto_to_rel_locktime(theirs->delay, &locktime))
return tal_free(tx);
/* First output is a P2SH to a complex redeem script (usu. for me) */