Store Pedersen commitment (outPk) for owned outputs during sync

CARROT outputs need the commitment for spend key derivation, but store_found_outputs was hardcoding commitment: None. Now looks up the commitment from the parsed TxOutput by index. Existing wallets need a rescan to
  populate the field.
This commit is contained in:
Matt Hess
2026-02-27 05:45:02 +00:00
parent 415f2cd6db
commit 8c02a452e8
+5 -1
View File
@@ -1793,7 +1793,11 @@ fn store_found_outputs(
block_timestamp: Some(block_timestamp as i64),
amount: output.amount.to_string(),
asset_type: output.asset_type.clone(),
commitment: None,
commitment: tx
.outputs
.get(output.output_index as usize)
.and_then(|o| o.commitment)
.map(hex::encode),
mask: Some(hex::encode(output.mask)),
subaddress_index: salvium_crypto::storage::SubaddressIndex {
major: output.subaddress_major as i64,