@@ -3282,6 +3282,7 @@ mod tests {
3282
3282
use ln:: channel:: { COMMITMENT_TX_BASE_WEIGHT , COMMITMENT_TX_WEIGHT_PER_HTLC } ;
3283
3283
use ln:: channelmanager:: { ChannelManager , ChannelManagerReadArgs , OnionKeys , PaymentFailReason , RAACommitmentOrder } ;
3284
3284
use ln:: channelmonitor:: { ChannelMonitor , ChannelMonitorUpdateErr , CLTV_CLAIM_BUFFER , HTLC_FAIL_TIMEOUT_BLOCKS , ManyChannelMonitor } ;
3285
+ use ln:: channel:: { ACCEPTED_HTLC_SCRIPT_WEIGHT , OFFERED_HTLC_SCRIPT_WEIGHT } ;
3285
3286
use ln:: router:: { Route , RouteHop , Router } ;
3286
3287
use ln:: msgs;
3287
3288
use ln:: msgs:: { ChannelMessageHandler , RoutingMessageHandler } ;
@@ -5838,7 +5839,7 @@ mod tests {
5838
5839
assert_eq ! ( revoked_local_txn[ 0 ] . output. len( ) , 2 ) ; // Only HTLC and output back to 0 are present
5839
5840
assert_eq ! ( revoked_local_txn[ 1 ] . input. len( ) , 1 ) ;
5840
5841
assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . previous_output. txid, revoked_local_txn[ 0 ] . txid( ) ) ;
5841
- assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ; // HTLC-Timeout
5842
+ assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // HTLC-Timeout
5842
5843
// Revoke the old state
5843
5844
claim_payment ( & nodes[ 0 ] , & vec ! ( & nodes[ 1 ] ) [ ..] , payment_preimage_3) ;
5844
5845
@@ -5957,7 +5958,7 @@ mod tests {
5957
5958
assert_eq ! ( revoked_local_txn[ 0 ] . input[ 0 ] . previous_output. txid, chan_1. 3 . txid( ) ) ;
5958
5959
assert_eq ! ( revoked_local_txn[ 1 ] . input. len( ) , 1 ) ;
5959
5960
assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . previous_output. txid, revoked_local_txn[ 0 ] . txid( ) ) ;
5960
- assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ; // HTLC-Timeout
5961
+ assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // HTLC-Timeout
5961
5962
check_spends ! ( revoked_local_txn[ 1 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
5962
5963
5963
5964
//Revoke the old state
@@ -5983,16 +5984,16 @@ mod tests {
5983
5984
witness_lens. insert ( node_txn[ 0 ] . input [ 2 ] . witness . last ( ) . unwrap ( ) . len ( ) ) ;
5984
5985
assert_eq ! ( witness_lens. len( ) , 3 ) ;
5985
5986
assert_eq ! ( * witness_lens. iter( ) . skip( 0 ) . next( ) . unwrap( ) , 77 ) ; // revoked to_local
5986
- assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , 133 ) ; // revoked offered HTLC
5987
- assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , 138 ) ; // revoked received HTLC
5987
+ assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // revoked offered HTLC
5988
+ assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ; // revoked received HTLC
5988
5989
5989
5990
// Next nodes[1] broadcasts its current local tx state:
5990
5991
assert_eq ! ( node_txn[ 1 ] . input. len( ) , 1 ) ;
5991
5992
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . previous_output. txid, chan_1. 3 . txid( ) ) ; //Spending funding tx unique txouput, tx broadcasted by ChannelManager
5992
5993
5993
5994
assert_eq ! ( node_txn[ 2 ] . input. len( ) , 1 ) ;
5994
5995
let witness_script = node_txn[ 2 ] . clone ( ) . input [ 0 ] . witness . pop ( ) . unwrap ( ) ;
5995
- assert_eq ! ( witness_script. len( ) , 133 ) ; //Spending an offered htlc output
5996
+ assert_eq ! ( witness_script. len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; //Spending an offered htlc output
5996
5997
assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 1 ] . txid( ) ) ;
5997
5998
assert_ne ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 0 ] . previous_output. txid) ;
5998
5999
assert_ne ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 1 ] . previous_output. txid) ;
@@ -6055,15 +6056,15 @@ mod tests {
6055
6056
witness_lens. insert ( node_txn[ 2 ] . input [ 0 ] . witness . last ( ) . unwrap ( ) . len ( ) ) ;
6056
6057
assert_eq ! ( witness_lens. len( ) , 3 ) ;
6057
6058
assert_eq ! ( * witness_lens. iter( ) . skip( 0 ) . next( ) . unwrap( ) , 77 ) ; // revoked to_local
6058
- assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , 133 ) ; // revoked offered HTLC
6059
- assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , 138 ) ; // revoked received HTLC
6059
+ assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // revoked offered HTLC
6060
+ assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ; // revoked received HTLC
6060
6061
6061
6062
assert_eq ! ( node_txn[ 3 ] . input. len( ) , 1 ) ;
6062
6063
check_spends ! ( node_txn[ 3 ] , chan_1. 3 . clone( ) ) ;
6063
6064
6064
6065
assert_eq ! ( node_txn[ 4 ] . input. len( ) , 1 ) ;
6065
6066
let witness_script = node_txn[ 4 ] . input [ 0 ] . witness . last ( ) . unwrap ( ) ;
6066
- assert_eq ! ( witness_script. len( ) , 133 ) ; //Spending an offered htlc output
6067
+ assert_eq ! ( witness_script. len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; //Spending an offered htlc output
6067
6068
assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 3 ] . txid( ) ) ;
6068
6069
assert_ne ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 0 ] . previous_output. txid) ;
6069
6070
assert_ne ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 1 ] . input[ 0 ] . previous_output. txid) ;
@@ -6128,11 +6129,11 @@ mod tests {
6128
6129
let node_txn = nodes[ 2 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ; // ChannelManager : 2 (commitment tx, HTLC-Success tx), ChannelMonitor : 1 (HTLC-Success tx)
6129
6130
assert_eq ! ( node_txn. len( ) , 3 ) ;
6130
6131
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6131
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6132
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6132
6133
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6133
6134
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6134
6135
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6135
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6136
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6136
6137
6137
6138
// Verify that B's ChannelManager is able to extract preimage from HTLC Success tx and pass it backward
6138
6139
nodes[ 1 ] . chain_monitor . block_connected_with_filtering ( & Block { header, txdata : node_txn} , 1 ) ;
@@ -6163,12 +6164,12 @@ mod tests {
6163
6164
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6164
6165
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6165
6166
check_spends ! ( node_txn[ 3 ] , commitment_tx[ 0 ] . clone( ) ) ;
6166
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6167
- assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6167
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6168
+ assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6168
6169
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6169
6170
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6170
6171
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6171
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6172
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6172
6173
node_txn. clear ( )
6173
6174
}
6174
6175
@@ -6187,9 +6188,9 @@ mod tests {
6187
6188
assert_eq ! ( node_txn. len( ) , 3 ) ;
6188
6189
assert_eq ! ( node_txn[ 0 ] , node_txn[ 2 ] ) ;
6189
6190
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6190
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6191
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6191
6192
check_spends ! ( node_txn[ 2 ] , commitment_tx[ 0 ] . clone( ) ) ;
6192
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6193
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6193
6194
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6194
6195
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6195
6196
let commitment_tx = node_txn[ 1 ] . clone ( ) ;
@@ -6207,12 +6208,12 @@ mod tests {
6207
6208
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6208
6209
check_spends ! ( node_txn[ 0 ] , commitment_tx. clone( ) ) ;
6209
6210
check_spends ! ( node_txn[ 3 ] , commitment_tx. clone( ) ) ;
6210
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6211
- assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6211
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6212
+ assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6212
6213
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6213
6214
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6214
6215
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6215
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6216
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6216
6217
}
6217
6218
6218
6219
#[ test]
@@ -6282,15 +6283,15 @@ mod tests {
6282
6283
assert_eq ! ( node_txn[ 1 ] , node_txn[ 6 ] ) ;
6283
6284
assert_eq ! ( node_txn[ 2 ] , node_txn[ 7 ] ) ;
6284
6285
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6285
- assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
6286
+ assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6286
6287
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6287
6288
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6288
6289
assert_eq ! ( node_txn[ 1 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 71 ) ;
6289
- assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
6290
+ assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6290
6291
check_spends ! ( node_txn[ 3 ] , chan_2. 3 . clone( ) ) ;
6291
6292
check_spends ! ( node_txn[ 4 ] , node_txn[ 3 ] . clone( ) ) ;
6292
6293
assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6293
- assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6294
+ assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6294
6295
timeout_tx = node_txn[ 0 ] . clone ( ) ;
6295
6296
node_txn. clear ( ) ;
6296
6297
}
@@ -6335,11 +6336,11 @@ mod tests {
6335
6336
assert_eq ! ( node_txn. len( ) , 4 ) ;
6336
6337
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6337
6338
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6338
- assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
6339
+ assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6339
6340
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6340
6341
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6341
6342
assert_eq ! ( node_txn[ 1 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 71 ) ;
6342
- assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
6343
+ assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6343
6344
}
6344
6345
6345
6346
#[ test]
@@ -8201,7 +8202,7 @@ mod tests {
8201
8202
let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ; // ChannelManager : 1 (local commitment tx), ChannelMonitor: 2 (1 preimage tx) * 2 (block-rescan)
8202
8203
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
8203
8204
assert_eq ! ( node_txn[ 0 ] , node_txn[ 2 ] ) ;
8204
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8205
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8205
8206
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
8206
8207
8207
8208
let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , 1 ) ; // , 0, 0, 1, 1);
@@ -8269,7 +8270,7 @@ mod tests {
8269
8270
assert_eq ! ( revoked_htlc_txn. len( ) , 3 ) ;
8270
8271
assert_eq ! ( revoked_htlc_txn[ 0 ] , revoked_htlc_txn[ 2 ] ) ;
8271
8272
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
8272
- assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8273
+ assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8273
8274
check_spends ! ( revoked_htlc_txn[ 0 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
8274
8275
check_spends ! ( revoked_htlc_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
8275
8276
@@ -8321,7 +8322,7 @@ mod tests {
8321
8322
assert_eq ! ( revoked_htlc_txn. len( ) , 3 ) ;
8322
8323
assert_eq ! ( revoked_htlc_txn[ 0 ] , revoked_htlc_txn[ 2 ] ) ;
8323
8324
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
8324
- assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
8325
+ assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
8325
8326
check_spends ! ( revoked_htlc_txn[ 0 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
8326
8327
8327
8328
// A will generate justice tx from B's revoked commitment/HTLC tx
@@ -8375,7 +8376,7 @@ mod tests {
8375
8376
}
8376
8377
let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8377
8378
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 1 ) ;
8378
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
8379
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
8379
8380
check_spends ! ( node_txn[ 0 ] , local_txn[ 0 ] . clone( ) ) ;
8380
8381
8381
8382
// Verify that B is able to spend its own HTLC-Success tx thanks to spendable output event given back by its ChannelMonitor
@@ -8407,7 +8408,7 @@ mod tests {
8407
8408
}
8408
8409
let node_txn = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8409
8410
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 1 ) ;
8410
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8411
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8411
8412
check_spends ! ( node_txn[ 0 ] , local_txn[ 0 ] . clone( ) ) ;
8412
8413
8413
8414
// Verify that A is able to spend its own HTLC-Timeout tx thanks to spendable output event given back by its ChannelMonitor
0 commit comments