@@ -3280,6 +3280,7 @@ mod tests {
3280
3280
use ln:: channel:: { COMMITMENT_TX_BASE_WEIGHT , COMMITMENT_TX_WEIGHT_PER_HTLC } ;
3281
3281
use ln:: channelmanager:: { ChannelManager , ChannelManagerReadArgs , OnionKeys , PaymentFailReason , RAACommitmentOrder } ;
3282
3282
use ln:: channelmonitor:: { ChannelMonitor , ChannelMonitorUpdateErr , CLTV_CLAIM_BUFFER , HTLC_FAIL_TIMEOUT_BLOCKS , ManyChannelMonitor } ;
3283
+ use ln:: channel:: { ACCEPTED_HTLC_SCRIPT_WEIGHT , OFFERED_HTLC_SCRIPT_WEIGHT } ;
3283
3284
use ln:: router:: { Route , RouteHop , Router } ;
3284
3285
use ln:: msgs;
3285
3286
use ln:: msgs:: { ChannelMessageHandler , RoutingMessageHandler } ;
@@ -5836,7 +5837,7 @@ mod tests {
5836
5837
assert_eq ! ( revoked_local_txn[ 0 ] . output. len( ) , 2 ) ; // Only HTLC and output back to 0 are present
5837
5838
assert_eq ! ( revoked_local_txn[ 1 ] . input. len( ) , 1 ) ;
5838
5839
assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . previous_output. txid, revoked_local_txn[ 0 ] . txid( ) ) ;
5839
- assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ; // HTLC-Timeout
5840
+ assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // HTLC-Timeout
5840
5841
// Revoke the old state
5841
5842
claim_payment ( & nodes[ 0 ] , & vec ! ( & nodes[ 1 ] ) [ ..] , payment_preimage_3) ;
5842
5843
@@ -5955,7 +5956,7 @@ mod tests {
5955
5956
assert_eq ! ( revoked_local_txn[ 0 ] . input[ 0 ] . previous_output. txid, chan_1. 3 . txid( ) ) ;
5956
5957
assert_eq ! ( revoked_local_txn[ 1 ] . input. len( ) , 1 ) ;
5957
5958
assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . previous_output. txid, revoked_local_txn[ 0 ] . txid( ) ) ;
5958
- assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ; // HTLC-Timeout
5959
+ assert_eq ! ( revoked_local_txn[ 1 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // HTLC-Timeout
5959
5960
check_spends ! ( revoked_local_txn[ 1 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
5960
5961
5961
5962
//Revoke the old state
@@ -5981,16 +5982,16 @@ mod tests {
5981
5982
witness_lens. insert ( node_txn[ 0 ] . input [ 2 ] . witness . last ( ) . unwrap ( ) . len ( ) ) ;
5982
5983
assert_eq ! ( witness_lens. len( ) , 3 ) ;
5983
5984
assert_eq ! ( * witness_lens. iter( ) . skip( 0 ) . next( ) . unwrap( ) , 77 ) ; // revoked to_local
5984
- assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , 133 ) ; // revoked offered HTLC
5985
- assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , 138 ) ; // revoked received HTLC
5985
+ assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // revoked offered HTLC
5986
+ assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ; // revoked received HTLC
5986
5987
5987
5988
// Next nodes[1] broadcasts its current local tx state:
5988
5989
assert_eq ! ( node_txn[ 1 ] . input. len( ) , 1 ) ;
5989
5990
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . previous_output. txid, chan_1. 3 . txid( ) ) ; //Spending funding tx unique txouput, tx broadcasted by ChannelManager
5990
5991
5991
5992
assert_eq ! ( node_txn[ 2 ] . input. len( ) , 1 ) ;
5992
5993
let witness_script = node_txn[ 2 ] . clone ( ) . input [ 0 ] . witness . pop ( ) . unwrap ( ) ;
5993
- assert_eq ! ( witness_script. len( ) , 133 ) ; //Spending an offered htlc output
5994
+ assert_eq ! ( witness_script. len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; //Spending an offered htlc output
5994
5995
assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 1 ] . txid( ) ) ;
5995
5996
assert_ne ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 0 ] . previous_output. txid) ;
5996
5997
assert_ne ! ( node_txn[ 2 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 1 ] . previous_output. txid) ;
@@ -6053,15 +6054,15 @@ mod tests {
6053
6054
witness_lens. insert ( node_txn[ 2 ] . input [ 0 ] . witness . last ( ) . unwrap ( ) . len ( ) ) ;
6054
6055
assert_eq ! ( witness_lens. len( ) , 3 ) ;
6055
6056
assert_eq ! ( * witness_lens. iter( ) . skip( 0 ) . next( ) . unwrap( ) , 77 ) ; // revoked to_local
6056
- assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , 133 ) ; // revoked offered HTLC
6057
- assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , 138 ) ; // revoked received HTLC
6057
+ assert_eq ! ( * witness_lens. iter( ) . skip( 1 ) . next( ) . unwrap( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; // revoked offered HTLC
6058
+ assert_eq ! ( * witness_lens. iter( ) . skip( 2 ) . next( ) . unwrap( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ; // revoked received HTLC
6058
6059
6059
6060
assert_eq ! ( node_txn[ 3 ] . input. len( ) , 1 ) ;
6060
6061
check_spends ! ( node_txn[ 3 ] , chan_1. 3 . clone( ) ) ;
6061
6062
6062
6063
assert_eq ! ( node_txn[ 4 ] . input. len( ) , 1 ) ;
6063
6064
let witness_script = node_txn[ 4 ] . input [ 0 ] . witness . last ( ) . unwrap ( ) ;
6064
- assert_eq ! ( witness_script. len( ) , 133 ) ; //Spending an offered htlc output
6065
+ assert_eq ! ( witness_script. len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ; //Spending an offered htlc output
6065
6066
assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 3 ] . txid( ) ) ;
6066
6067
assert_ne ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 0 ] . input[ 0 ] . previous_output. txid) ;
6067
6068
assert_ne ! ( node_txn[ 4 ] . input[ 0 ] . previous_output. txid, node_txn[ 1 ] . input[ 0 ] . previous_output. txid) ;
@@ -6126,11 +6127,11 @@ mod tests {
6126
6127
let node_txn = nodes[ 2 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . clone ( ) ; // ChannelManager : 2 (commitment tx, HTLC-Success tx), ChannelMonitor : 1 (HTLC-Success tx)
6127
6128
assert_eq ! ( node_txn. len( ) , 3 ) ;
6128
6129
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6129
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6130
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6130
6131
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6131
6132
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6132
6133
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6133
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6134
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6134
6135
6135
6136
// Verify that B's ChannelManager is able to extract preimage from HTLC Success tx and pass it backward
6136
6137
nodes[ 1 ] . chain_monitor . block_connected_with_filtering ( & Block { header, txdata : node_txn} , 1 ) ;
@@ -6161,12 +6162,12 @@ mod tests {
6161
6162
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6162
6163
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6163
6164
check_spends ! ( node_txn[ 3 ] , commitment_tx[ 0 ] . clone( ) ) ;
6164
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6165
- assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6165
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6166
+ assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6166
6167
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6167
6168
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6168
6169
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6169
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6170
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6170
6171
node_txn. clear ( )
6171
6172
}
6172
6173
@@ -6185,9 +6186,9 @@ mod tests {
6185
6186
assert_eq ! ( node_txn. len( ) , 3 ) ;
6186
6187
assert_eq ! ( node_txn[ 0 ] , node_txn[ 2 ] ) ;
6187
6188
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6188
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6189
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6189
6190
check_spends ! ( node_txn[ 2 ] , commitment_tx[ 0 ] . clone( ) ) ;
6190
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6191
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6191
6192
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6192
6193
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6193
6194
let commitment_tx = node_txn[ 1 ] . clone ( ) ;
@@ -6205,12 +6206,12 @@ mod tests {
6205
6206
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6206
6207
check_spends ! ( node_txn[ 0 ] , commitment_tx. clone( ) ) ;
6207
6208
check_spends ! ( node_txn[ 3 ] , commitment_tx. clone( ) ) ;
6208
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6209
- assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 138 ) ;
6209
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6210
+ assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6210
6211
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6211
6212
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6212
6213
assert_eq ! ( node_txn[ 1 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6213
- assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6214
+ assert_eq ! ( node_txn[ 2 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6214
6215
}
6215
6216
6216
6217
#[ test]
@@ -6280,15 +6281,15 @@ mod tests {
6280
6281
assert_eq ! ( node_txn[ 1 ] , node_txn[ 6 ] ) ;
6281
6282
assert_eq ! ( node_txn[ 2 ] , node_txn[ 7 ] ) ;
6282
6283
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6283
- assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
6284
+ assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6284
6285
check_spends ! ( node_txn[ 1 ] , chan_2. 3 . clone( ) ) ;
6285
6286
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6286
6287
assert_eq ! ( node_txn[ 1 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 71 ) ;
6287
- assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
6288
+ assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6288
6289
check_spends ! ( node_txn[ 3 ] , chan_2. 3 . clone( ) ) ;
6289
6290
check_spends ! ( node_txn[ 4 ] , node_txn[ 3 ] . clone( ) ) ;
6290
6291
assert_eq ! ( node_txn[ 3 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 71 ) ;
6291
- assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , 133 ) ;
6292
+ assert_eq ! ( node_txn[ 4 ] . input[ 0 ] . witness. clone( ) . last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6292
6293
timeout_tx = node_txn[ 0 ] . clone ( ) ;
6293
6294
node_txn. clear ( ) ;
6294
6295
}
@@ -6333,11 +6334,11 @@ mod tests {
6333
6334
assert_eq ! ( node_txn. len( ) , 4 ) ;
6334
6335
assert_eq ! ( node_txn[ 0 ] , node_txn[ 3 ] ) ;
6335
6336
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
6336
- assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
6337
+ assert_eq ! ( node_txn[ 0 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
6337
6338
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
6338
6339
check_spends ! ( node_txn[ 2 ] , node_txn[ 1 ] . clone( ) ) ;
6339
6340
assert_eq ! ( node_txn[ 1 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 71 ) ;
6340
- assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
6341
+ assert_eq ! ( node_txn[ 2 ] . clone( ) . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
6341
6342
}
6342
6343
6343
6344
#[ test]
@@ -8224,7 +8225,7 @@ mod tests {
8224
8225
let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ; // ChannelManager : 1 (local commitment tx), ChannelMonitor: 2 (1 preimage tx) * 2 (block-rescan)
8225
8226
check_spends ! ( node_txn[ 0 ] , commitment_tx[ 0 ] . clone( ) ) ;
8226
8227
assert_eq ! ( node_txn[ 0 ] , node_txn[ 2 ] ) ;
8227
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8228
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8228
8229
check_spends ! ( node_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
8229
8230
8230
8231
let spend_txn = check_spendable_outputs ! ( nodes[ 1 ] , 1 ) ; // , 0, 0, 1, 1);
@@ -8292,7 +8293,7 @@ mod tests {
8292
8293
assert_eq ! ( revoked_htlc_txn. len( ) , 3 ) ;
8293
8294
assert_eq ! ( revoked_htlc_txn[ 0 ] , revoked_htlc_txn[ 2 ] ) ;
8294
8295
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
8295
- assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8296
+ assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8296
8297
check_spends ! ( revoked_htlc_txn[ 0 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
8297
8298
check_spends ! ( revoked_htlc_txn[ 1 ] , chan_1. 3 . clone( ) ) ;
8298
8299
@@ -8344,7 +8345,7 @@ mod tests {
8344
8345
assert_eq ! ( revoked_htlc_txn. len( ) , 3 ) ;
8345
8346
assert_eq ! ( revoked_htlc_txn[ 0 ] , revoked_htlc_txn[ 2 ] ) ;
8346
8347
assert_eq ! ( revoked_htlc_txn[ 0 ] . input. len( ) , 1 ) ;
8347
- assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
8348
+ assert_eq ! ( revoked_htlc_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
8348
8349
check_spends ! ( revoked_htlc_txn[ 0 ] , revoked_local_txn[ 0 ] . clone( ) ) ;
8349
8350
8350
8351
// A will generate justice tx from B's revoked commitment/HTLC tx
@@ -8398,7 +8399,7 @@ mod tests {
8398
8399
}
8399
8400
let node_txn = nodes[ 1 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8400
8401
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 1 ) ;
8401
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 138 ) ;
8402
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
8402
8403
check_spends ! ( node_txn[ 0 ] , local_txn[ 0 ] . clone( ) ) ;
8403
8404
8404
8405
// Verify that B is able to spend its own HTLC-Success tx thanks to spendable output event given back by its ChannelMonitor
@@ -8430,7 +8431,7 @@ mod tests {
8430
8431
}
8431
8432
let node_txn = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) ;
8432
8433
assert_eq ! ( node_txn[ 0 ] . input. len( ) , 1 ) ;
8433
- assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , 133 ) ;
8434
+ assert_eq ! ( node_txn[ 0 ] . input[ 0 ] . witness. last( ) . unwrap( ) . len( ) , OFFERED_HTLC_SCRIPT_WEIGHT ) ;
8434
8435
check_spends ! ( node_txn[ 0 ] , local_txn[ 0 ] . clone( ) ) ;
8435
8436
8436
8437
// 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