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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user