input/size: define witness constants needed
We define the witness constanst we need for fee estimation for this HTLC second level type.
This commit is contained in:
parent
241e21a0d1
commit
8eb6d7cf87
@ -328,6 +328,12 @@ const (
|
||||
AcceptedHtlcScriptSize = 3*1 + 20 + 5*1 + 33 + 8*1 + 20 + 4*1 +
|
||||
33 + 5*1 + 4 + 8*1
|
||||
|
||||
// AcceptedHtlcScriptSizeConfirmed 143 bytes
|
||||
//
|
||||
// TODO(halseth): the non-confirmed version currently includes the
|
||||
// overhead.
|
||||
AcceptedHtlcScriptSizeConfirmed = AcceptedHtlcScriptSize // + HtlcConfirmedScriptOverhead
|
||||
|
||||
// AcceptedHtlcTimeoutWitnessSize 219
|
||||
// - number_of_witness_elements: 1 byte
|
||||
// - sender_sig_length: 1 byte
|
||||
@ -361,6 +367,12 @@ const (
|
||||
AcceptedHtlcSuccessWitnessSize = 1 + 1 + 1 + 73 + 1 + 73 + 1 + 32 + 1 +
|
||||
AcceptedHtlcScriptSize
|
||||
|
||||
// AcceptedHtlcSuccessWitnessSizeConfirmed 327 bytes
|
||||
//
|
||||
// Input to second level success tx, spending 1 CSV delayed HTLC output.
|
||||
AcceptedHtlcSuccessWitnessSizeConfirmed = 1 + 1 + 1 + 73 + 1 + 73 + 1 + 32 + 1 +
|
||||
AcceptedHtlcScriptSizeConfirmed
|
||||
|
||||
// OfferedHtlcScriptSize 136 bytes
|
||||
// - OP_DUP: 1 byte
|
||||
// - OP_HASH160: 1 byte
|
||||
@ -398,6 +410,12 @@ const (
|
||||
// - OP_ENDIF: 1 byte
|
||||
OfferedHtlcScriptSize = 3*1 + 20 + 5*1 + 33 + 10*1 + 33 + 5*1 + 20 + 7*1
|
||||
|
||||
// OfferedHtlcScriptSizeConfirmed 136 bytes
|
||||
//
|
||||
// TODO(halseth): the non-confirmed version currently includes the
|
||||
// overhead.
|
||||
OfferedHtlcScriptSizeConfirmed = OfferedHtlcScriptSize // + HtlcConfirmedScriptOverhead
|
||||
|
||||
// OfferedHtlcSuccessWitnessSize 245 bytes
|
||||
// - number_of_witness_elements: 1 byte
|
||||
// - receiver_sig_length: 1 byte
|
||||
@ -420,6 +438,12 @@ const (
|
||||
// - witness_script (offered_htlc_script)
|
||||
OfferedHtlcTimeoutWitnessSize = 1 + 1 + 1 + 73 + 1 + 73 + 1 + 1 + OfferedHtlcScriptSize
|
||||
|
||||
// OfferedHtlcTimeoutWitnessSizeConfirmed 288 bytes
|
||||
//
|
||||
// Input to second level timeout tx, spending 1 CSV delayed HTLC output.
|
||||
OfferedHtlcTimeoutWitnessSizeConfirmed = 1 + 1 + 1 + 73 + 1 + 73 + 1 + 1 +
|
||||
OfferedHtlcScriptSizeConfirmed
|
||||
|
||||
// OfferedHtlcPenaltyWitnessSize 246 bytes
|
||||
// - number_of_witness_elements: 1 byte
|
||||
// - revocation_sig_length: 1 byte
|
||||
|
Loading…
Reference in New Issue
Block a user