@@ -3286,6 +3286,7 @@ mod tests {
3286
3286
use ln:: channel:: { COMMITMENT_TX_BASE_WEIGHT , COMMITMENT_TX_WEIGHT_PER_HTLC } ;
3287
3287
use ln:: channelmanager:: { ChannelManager , ChannelManagerReadArgs , OnionKeys , PaymentFailReason , RAACommitmentOrder } ;
3288
3288
use ln:: channelmonitor:: { ChannelMonitor , ChannelMonitorUpdateErr , CLTV_CLAIM_BUFFER , HTLC_FAIL_TIMEOUT_BLOCKS , ManyChannelMonitor } ;
3289
+ use ln:: channel:: { ACCEPTED_HTLC_SCRIPT_WEIGHT , OFFERED_HTLC_SCRIPT_WEIGHT } ;
3289
3290
use ln:: router:: { Route , RouteHop , Router } ;
3290
3291
use ln:: msgs;
3291
3292
use ln:: msgs:: { ChannelMessageHandler , RoutingMessageHandler } ;
@@ -5842,7 +5843,7 @@ mod tests {
5842
5843
assert_eq ! ( revoked_local_txn[ 0 ] . output. len( ) , 2 ) ; // Only HTLC and output back to 0 are present
5843
5844
assert_eq ! ( revoked_local_txn[ 1 ] . input. len( ) , 1 ) ;
5844
5845
assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . previous_output. txid, revoked_local_txn[ 0 ] . txid( ) ) ;
5845
- assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ; // HTLC-Timeout
5846
+ assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // HTLC-Timeout
5846
5847
// Revoke the old state
5847
5848
claim_payment ( & nodes[ 0 ] , & vec ! ( & nodes[ 1 ] ) [ ..] , payment_preimage_3) ;
5848
5849
@@ -5961,7 +5962,7 @@ mod tests {
5961
5962
assert_eq ! ( revoked_local_txn[ 0 ] . input[ 0 ] . previous_output. txid, chan_1. 3 . txid( ) ) ;
5962
5963
assert_eq ! ( revoked_local_txn[ 1 ] . input. len( ) , 1 ) ;
5963
5964
assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . previous_output. txid, revoked_local_txn[ 0 ] . txid( ) ) ;
5964
- assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ; // HTLC-Timeout
5965
+ assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // HTLC-Timeout
5965
5966
check_spends ! ( revoked_local_txn[ 1 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
5966
5967
5967
5968
//Revoke the old state
@@ -5987,16 +5988,16 @@ mod tests {
5987
5988
witness_lens. insert ( node_txn[ 0 ] . input [ 2 ] . witness . last ( ) . unwrap ( ) . len ( ) ) ;
5988
5989
assert_eq ! ( witness_lens. len( ) , 3 ) ;
5989
5990
assert_eq ! ( * witness_lens. iter( ) . skip( 0 ) . next( ) . unwrap( ) , 77 ) ; // revoked to_local
5990
- assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , 133 ) ; // revoked offered HTLC
5991
- assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , 138 ) ; // revoked received HTLC
5991
+ assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // revoked offered HTLC
5992
+ assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ; // revoked received HTLC
5992
5993
5993
5994
// Next nodes[1] broadcasts its current local tx state:
5994
5995
assert_eq ! ( node_txn[ 1 ] . input. len( ) , 1 ) ;
5995
5996
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . previous_output. txid, chan_1. 3 . txid( ) ) ; //Spending funding tx unique txouput, tx broadcasted by ChannelManager
5996
5997
5997
5998
assert_eq ! ( node_txn[ 2 ] . input. len( ) , 1 ) ;
5998
5999
let witness_script = node_txn[ 2 ] . clone ( ) . input [ 0 ] . witness . pop ( ) . unwrap ( ) ;
5999
- assert_eq ! ( witness_script. len( ) , 133 ) ; //Spending an offered htlc output
6000
+ assert_eq ! ( witness_script. len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; //Spending an offered htlc output
6000
6001
assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 1 ] . txid( ) ) ;
6001
6002
assert_ne ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 0 ] . previous_output. txid) ;
6002
6003
assert_ne ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 1 ] . previous_output. txid) ;
@@ -6059,15 +6060,15 @@ mod tests {
6059
6060
witness_lens. insert ( node_txn[ 2 ] . input [ 0 ] . witness . last ( ) . unwrap ( ) . len ( ) ) ;
6060
6061
assert_eq ! ( witness_lens. len( ) , 3 ) ;
6061
6062
assert_eq ! ( * witness_lens. iter( ) . skip( 0 ) . next( ) . unwrap( ) , 77 ) ; // revoked to_local
6062
- assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , 133 ) ; // revoked offered HTLC
6063
- assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , 138 ) ; // revoked received HTLC
6063
+ assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // revoked offered HTLC
6064
+ assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ; // revoked received HTLC
6064
6065
6065
6066
assert_eq ! ( node_txn[ 3 ] . input. len( ) , 1 ) ;
6066
6067
check_spends ! ( node_txn[ 3 ] , chan_1. 3 . clone( ) ) ;
6067
6068
6068
6069
assert_eq ! ( node_txn[ 4 ] . input. len( ) , 1 ) ;
6069
6070
let witness_script = node_txn[ 4 ] . input [ 0 ] . witness . last ( ) . unwrap ( ) ;
6070
- assert_eq ! ( witness_script. len( ) , 133 ) ; //Spending an offered htlc output
6071
+ assert_eq ! ( witness_script. len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; //Spending an offered htlc output
6071
6072
assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 3 ] . txid( ) ) ;
6072
6073
assert_ne ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 0 ] . previous_output. txid) ;
6073
6074
assert_ne ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 1 ] . input[ 0 ] . previous_output. txid) ;
@@ -6132,11 +6133,11 @@ mod tests {
6132
6133
let node_txn = nodes[ 2 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ; // ChannelManager : 2 (commitment tx, HTLC-Success tx), ChannelMonitor : 1 (HTLC-Success tx)
6133
6134
assert_eq ! ( node_txn. len( ) , 3 ) ;
6134
6135
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6135
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6136
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6136
6137
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6137
6138
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6138
6139
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6139
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6140
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6140
6141
6141
6142
// Verify that B's ChannelManager is able to extract preimage from HTLC Success tx and pass it backward
6142
6143
nodes[ 1 ] . chain_monitor . block_connected_with_filtering ( & Block { header, txdata : node_txn} , 1 ) ;
@@ -6167,12 +6168,12 @@ mod tests {
6167
6168
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6168
6169
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6169
6170
check_spends ! ( node_txn[ 3 ] , commitment_tx[ 0 ] . clone( ) ) ;
6170
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6171
- assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6171
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6172
+ assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6172
6173
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6173
6174
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6174
6175
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6175
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6176
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6176
6177
node_txn. clear ( )
6177
6178
}
6178
6179
@@ -6191,9 +6192,9 @@ mod tests {
6191
6192
assert_eq ! ( node_txn. len( ) , 3 ) ;
6192
6193
assert_eq ! ( node_txn[ 0 ] , node_txn[ 2 ] ) ;
6193
6194
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6194
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6195
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6195
6196
check_spends ! ( node_txn[ 2 ] , commitment_tx[ 0 ] . clone( ) ) ;
6196
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6197
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6197
6198
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6198
6199
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6199
6200
let commitment_tx = node_txn[ 1 ] . clone ( ) ;
@@ -6211,12 +6212,12 @@ mod tests {
6211
6212
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6212
6213
check_spends ! ( node_txn[ 0 ] , commitment_tx. clone( ) ) ;
6213
6214
check_spends ! ( node_txn[ 3 ] , commitment_tx. clone( ) ) ;
6214
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6215
- assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6215
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6216
+ assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6216
6217
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6217
6218
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6218
6219
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6219
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6220
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6220
6221
}
6221
6222
6222
6223
#[ test]
@@ -6286,15 +6287,15 @@ mod tests {
6286
6287
assert_eq ! ( node_txn[ 1 ] , node_txn[ 6 ] ) ;
6287
6288
assert_eq ! ( node_txn[ 2 ] , node_txn[ 7 ] ) ;
6288
6289
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6289
- assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
6290
+ assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6290
6291
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6291
6292
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6292
6293
assert_eq ! ( node_txn[ 1 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 71 ) ;
6293
- assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
6294
+ assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6294
6295
check_spends ! ( node_txn[ 3 ] , chan_2. 3 . clone( ) ) ;
6295
6296
check_spends ! ( node_txn[ 4 ] , node_txn[ 3 ] . clone( ) ) ;
6296
6297
assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6297
- assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6298
+ assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6298
6299
timeout_tx = node_txn[ 0 ] . clone ( ) ;
6299
6300
node_txn. clear ( ) ;
6300
6301
}
@@ -6339,11 +6340,11 @@ mod tests {
6339
6340
assert_eq ! ( node_txn. len( ) , 4 ) ;
6340
6341
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6341
6342
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6342
- assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
6343
+ assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6343
6344
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6344
6345
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6345
6346
assert_eq ! ( node_txn[ 1 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 71 ) ;
6346
- assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
6347
+ assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6347
6348
}
6348
6349
6349
6350
#[ test]
@@ -8205,7 +8206,7 @@ mod tests {
8205
8206
let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ; // ChannelManager : 1 (local commitment tx), ChannelMonitor: 2 (1 preimage tx) * 2 (block-rescan)
8206
8207
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
8207
8208
assert_eq ! ( node_txn[ 0 ] , node_txn[ 2 ] ) ;
8208
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8209
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8209
8210
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
8210
8211
8211
8212
let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , 1 ) ; // , 0, 0, 1, 1);
@@ -8273,7 +8274,7 @@ mod tests {
8273
8274
assert_eq ! ( revoked_htlc_txn. len( ) , 3 ) ;
8274
8275
assert_eq ! ( revoked_htlc_txn[ 0 ] , revoked_htlc_txn[ 2 ] ) ;
8275
8276
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
8276
- assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8277
+ assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8277
8278
check_spends ! ( revoked_htlc_txn[ 0 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
8278
8279
check_spends ! ( revoked_htlc_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
8279
8280
@@ -8325,7 +8326,7 @@ mod tests {
8325
8326
assert_eq ! ( revoked_htlc_txn. len( ) , 3 ) ;
8326
8327
assert_eq ! ( revoked_htlc_txn[ 0 ] , revoked_htlc_txn[ 2 ] ) ;
8327
8328
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
8328
- assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
8329
+ assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
8329
8330
check_spends ! ( revoked_htlc_txn[ 0 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
8330
8331
8331
8332
// A will generate justice tx from B's revoked commitment/HTLC tx
@@ -8379,7 +8380,7 @@ mod tests {
8379
8380
}
8380
8381
let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8381
8382
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 1 ) ;
8382
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
8383
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
8383
8384
check_spends ! ( node_txn[ 0 ] , local_txn[ 0 ] . clone( ) ) ;
8384
8385
8385
8386
// Verify that B is able to spend its own HTLC-Success tx thanks to spendable output event given back by its ChannelMonitor
@@ -8411,7 +8412,7 @@ mod tests {
8411
8412
}
8412
8413
let node_txn = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8413
8414
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 1 ) ;
8414
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8415
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8415
8416
check_spends ! ( node_txn[ 0 ] , local_txn[ 0 ] . clone( ) ) ;
8416
8417
8417
8418
// 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