@@ -494,8 +494,10 @@ int secp256k1_silentpayments_recipient_scan_outputs(
494
494
found = 0 ;
495
495
for (i = 0 ; i < n_tx_outputs ; i ++ ) {
496
496
if (secp256k1_xonly_pubkey_cmp (ctx , & P_output_xonly , tx_outputs [i ]) == 0 ) {
497
- found_outputs [n_found ]-> output = * tx_outputs [ i ] ;
497
+ secp256k1_xonly_pubkey_save ( & found_outputs [n_found ]-> output , & P_output_ge ) ;
498
498
secp256k1_scalar_get_b32 (found_outputs [n_found ]-> tweak , & t_k_scalar );
499
+ found_outputs [n_found ]-> found_with_label = 0 ;
500
+ secp256k1_pubkey_save (& found_outputs [n_found ]-> label , & P_output_ge );
499
501
found = 1 ;
500
502
n_found ++ ;
501
503
k ++ ;
@@ -522,9 +524,9 @@ int secp256k1_silentpayments_recipient_scan_outputs(
522
524
523
525
label_tweak = label_lookup (& label_pubkey , label_context );
524
526
if (label_tweak != NULL ) {
525
- found_outputs [n_found ]-> output = * tx_outputs [ i ] ;
527
+ secp256k1_xonly_pubkey_save ( & found_outputs [n_found ]-> output , & tx_output_ge ) ;
526
528
found_outputs [n_found ]-> found_with_label = 1 ;
527
- found_outputs [n_found ]-> label = label_pubkey ;
529
+ secp256k1_pubkey_save ( & found_outputs [n_found ]-> label , & label_ge ) ;
528
530
secp256k1_scalar_get_b32 (found_outputs [n_found ]-> tweak , & t_k_scalar );
529
531
if (!secp256k1_ec_seckey_tweak_add (ctx , found_outputs [n_found ]-> tweak , label_tweak )) {
530
532
return 0 ;
@@ -544,9 +546,9 @@ int secp256k1_silentpayments_recipient_scan_outputs(
544
546
545
547
label_tweak = label_lookup (& label_pubkey , label_context );
546
548
if (label_tweak != NULL ) {
547
- found_outputs [n_found ]-> output = * tx_outputs [ i ] ;
549
+ secp256k1_xonly_pubkey_save ( & found_outputs [n_found ]-> output , & tx_output_ge ) ;
548
550
found_outputs [n_found ]-> found_with_label = 1 ;
549
- found_outputs [n_found ]-> label = label_pubkey ;
551
+ secp256k1_pubkey_save ( & found_outputs [n_found ]-> label , & label_ge ) ;
550
552
secp256k1_scalar_get_b32 (found_outputs [n_found ]-> tweak , & t_k_scalar );
551
553
if (!secp256k1_ec_seckey_tweak_add (ctx , found_outputs [n_found ]-> tweak , label_tweak )) {
552
554
return 0 ;
0 commit comments