From 71e47283cf14225a3c628b9cd7e2d7cbf3df94e6 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 29 Jul 2017 18:21:41 -0700 Subject: [PATCH] lnwallet: update size.go to add the weight of the success+timeout txns This commit updates the constants in size.go to include the weight of the HTLC success and timeout transactions. These values are required in order to properly compute the fee required for a particular HTLC transaction. The fee will change depending on if the HTLC is incoming or outgoing. --- lnwallet/size.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lnwallet/size.go b/lnwallet/size.go index cadde8dd..466a9dd1 100644 --- a/lnwallet/size.go +++ b/lnwallet/size.go @@ -112,6 +112,13 @@ const ( // Handling", based on the fact that we need to sweep all HTLCs within // one penalty transaction. MaxHTLCNumber = 1253 + // HtlcTimeoutWeight is the weight of the HTLC timeout transaction + // which will transition an outgoing HTLC to the delay-and-claim state. + HtlcTimeoutWeight = 663 + + // HtlcSuccessWeight is the weight of the HTLC success transaction + // which will transition an incoming HTLC to the delay-and-claim state. + HtlcSuccessWeight = 703 ) // estimateCommitTxWeight estimate commitment transaction weight depending on