mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-05 23:24:21 +01:00
peer: handle fulfull and fail onchain.
We now need to use bitcoin_witness_htlc with the r value, so that API is updated to take 'struct rval' or 'struct sha256'. We use the nc->delay amount (ie. dstate->config.min_htlc_expiry) to wait for a timeout refund to be buried before "failing" upstream. This should probably be made into a clearer parameter rather than overloading this one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Header from folded patch 'dont-use-peer-nc-in-onchain-code.patch': peer: Don't use peer->nc->delay for onchain case. Use the config var directly. We should be freeing peer->nc when the connection dies anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -89,7 +89,7 @@ u8 **bitcoin_witness_secret(const tal_t *ctx,
|
||||
|
||||
/* Create a witness which spends bitcoin_redeeem_htlc_recv/send */
|
||||
u8 **bitcoin_witness_htlc(const tal_t *ctx,
|
||||
const struct sha256 *htlc_or_revocation_preimage,
|
||||
const void *htlc_or_revocation_preimage,
|
||||
const struct bitcoin_signature *sig,
|
||||
const u8 *witnessscript);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user