input: add witness gen and weight estimates for new commitment type

This witness generators and weight estimates added only apply for the
new script-enforced leased channel commitment type.
This commit is contained in:
Wilmer Paulino authored and Olaoluwa Osuntokun committed 2021-10-19 18:30:27 -07:00
1 parent b84307e62e
commit 652f841738
2 files changed
+75 -12

No files matched your search

+11
View File
@@ -270,6 +270,17 @@ const (
// - OP_CHECKSIG: 1 byte
ToLocalScriptSize = 1 + 1 + 33 + 1 + 1 + 4 + 1 + 1 + 1 + 33 + 1 + 1
// LeaseWitnessScriptSizeOverhead represents the size overhead in bytes
// of the witness scripts used within script enforced lease commitments.
// This overhead results from the additional CLTV clause required to
// spend.
//
// - OP_DATA: 1 byte
// - lease_expiry: 4 bytes
// - OP_CHECKLOCKTIMEVERIFY: 1 byte
// - OP_DROP: 1 byte
LeaseWitnessScriptSizeOverhead = 1 + 4 + 1 + 1
// ToLocalTimeoutWitnessSize 156 bytes
// - number_of_witness_elements: 1 byte
// - local_delay_sig_length: 1 byte