mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Implement shared key derivation according to https://github.com/monero-project/research-lab/issues/103
Currently solely used for single signer change outputs, intended to be used for funds into Serai and multisig change outputs (dependent on #2). Also cleans the file layout, makes scanning a bit more robust, doesn't return outputs of amount 0, and shuffles outputs.
This commit is contained in:
@@ -84,7 +84,12 @@ pub async fn send_core(test: usize, multisig: bool) {
|
||||
tx = Some(rpc.get_block_transactions(start).await.unwrap().swap_remove(0));
|
||||
}
|
||||
|
||||
let output = transaction::scan(tx.as_ref().unwrap(), view, spend_pub).swap_remove(0);
|
||||
// Grab the largest output available
|
||||
let output = {
|
||||
let mut outputs = transaction::scan(tx.as_ref().unwrap(), view, spend_pub);
|
||||
outputs.sort_by(|x, y| x.commitment.amount.cmp(&y.commitment.amount).reverse());
|
||||
outputs.swap_remove(0)
|
||||
};
|
||||
// Test creating a zero change output and a non-zero change output
|
||||
amount = output.commitment.amount - u64::try_from(i).unwrap();
|
||||
outputs.push(output);
|
||||
|
||||
Reference in New Issue
Block a user