@@ -2676,7 +2676,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
26762676 } ,
26772677 ChannelMonitorUpdateStep :: PaymentPreimage { payment_preimage } => {
26782678 log_trace ! ( logger, "Updating ChannelMonitor with payment preimage" ) ;
2679- self . provide_payment_preimage ( & PaymentHash ( Sha256 :: hash ( & payment_preimage. 0 [ ..] ) . into_inner ( ) ) , & payment_preimage, broadcaster, & bounded_fee_estimator, logger)
2679+ self . provide_payment_preimage ( & PaymentHash ( Sha256 :: hash ( & payment_preimage. 0 [ ..] ) . to_byte_array ( ) ) , & payment_preimage, broadcaster, & bounded_fee_estimator, logger)
26802680 } ,
26812681 ChannelMonitorUpdateStep :: CommitmentSecret { idx, secret } => {
26822682 log_trace ! ( logger, "Updating ChannelMonitor with commitment secret" ) ;
@@ -4316,7 +4316,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
43164316 let mut payment_preimages = HashMap :: with_capacity ( cmp:: min ( payment_preimages_len as usize , MAX_ALLOC_SIZE / 32 ) ) ;
43174317 for _ in 0 ..payment_preimages_len {
43184318 let preimage: PaymentPreimage = Readable :: read ( reader) ?;
4319- let hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 [ ..] ) . into_inner ( ) ) ;
4319+ let hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 [ ..] ) . to_byte_array ( ) ) ;
43204320 if let Some ( _) = payment_preimages. insert ( hash, preimage) {
43214321 return Err ( DecodeError :: InvalidValue ) ;
43224322 }
@@ -4620,7 +4620,7 @@ mod tests {
46204620 {
46214621 for i in 0 ..20 {
46224622 let preimage = PaymentPreimage ( [ i; 32 ] ) ;
4623- let hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 [ ..] ) . into_inner ( ) ) ;
4623+ let hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 [ ..] ) . to_byte_array ( ) ) ;
46244624 preimages. push ( ( preimage, hash) ) ;
46254625 }
46264626 }
@@ -4705,9 +4705,9 @@ mod tests {
47054705 let dummy_commitment_tx = HolderCommitmentTransaction :: dummy ( & mut htlcs) ;
47064706 monitor. provide_latest_holder_commitment_tx ( dummy_commitment_tx. clone ( ) ,
47074707 htlcs. into_iter ( ) . map ( |( htlc, _) | ( htlc, Some ( dummy_sig) , None ) ) . collect ( ) ) . unwrap ( ) ;
4708- monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_inner ( Sha256 :: hash ( b"1" ) . into_inner ( ) ) ,
4708+ monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_byte_array ( Sha256 :: hash ( b"1" ) . to_byte_array ( ) ) ,
47094709 preimages_slice_to_htlc_outputs ! ( preimages[ 5 ..15 ] ) , 281474976710655 , dummy_key, & logger) ;
4710- monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_inner ( Sha256 :: hash ( b"2" ) . into_inner ( ) ) ,
4710+ monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_byte_array ( Sha256 :: hash ( b"2" ) . to_byte_array ( ) ) ,
47114711 preimages_slice_to_htlc_outputs ! ( preimages[ 15 ..20 ] ) , 281474976710654 , dummy_key, & logger) ;
47124712 for & ( ref preimage, ref hash) in preimages. iter ( ) {
47134713 let bounded_fee_estimator = LowerBoundedFeeEstimator :: new ( & fee_estimator) ;
@@ -4722,7 +4722,7 @@ mod tests {
47224722 test_preimages_exist ! ( & preimages[ 0 ..10 ] , monitor) ;
47234723 test_preimages_exist ! ( & preimages[ 15 ..20 ] , monitor) ;
47244724
4725- monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_inner ( Sha256 :: hash ( b"3" ) . into_inner ( ) ) ,
4725+ monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_byte_array ( Sha256 :: hash ( b"3" ) . to_byte_array ( ) ) ,
47264726 preimages_slice_to_htlc_outputs ! ( preimages[ 17 ..20 ] ) , 281474976710653 , dummy_key, & logger) ;
47274727
47284728 // Now provide a further secret, pruning preimages 15-17
@@ -4732,7 +4732,7 @@ mod tests {
47324732 test_preimages_exist ! ( & preimages[ 0 ..10 ] , monitor) ;
47334733 test_preimages_exist ! ( & preimages[ 17 ..20 ] , monitor) ;
47344734
4735- monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_inner ( Sha256 :: hash ( b"4" ) . into_inner ( ) ) ,
4735+ monitor. provide_latest_counterparty_commitment_tx ( Txid :: from_byte_array ( Sha256 :: hash ( b"4" ) . to_byte_array ( ) ) ,
47364736 preimages_slice_to_htlc_outputs ! ( preimages[ 18 ..20 ] ) , 281474976710652 , dummy_key, & logger) ;
47374737
47384738 // Now update holder commitment tx info, pruning only element 18 as we still care about the
0 commit comments