mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-21 23:29:50 -05:00
Update to latest monero-rs
This commit is contained in:
parent
1af0116cac
commit
702e1767c7
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2265,7 +2265,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "monero"
|
name = "monero"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
source = "git+https://github.com/comit-network/monero-rs?branch=open-outputs#9f93483d9b648cdbe4a4e0db2c5b0b306473b424"
|
source = "git+https://github.com/comit-network/monero-rs?branch=fix-bulletproofs#fae784dabbbc7c759334a031a2802813fffec792"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58-monero",
|
"base58-monero",
|
||||||
"clear_on_drop",
|
"clear_on_drop",
|
||||||
|
@ -3,4 +3,4 @@ members = ["monero-adaptor", "monero-harness", "monero-rpc", "swap", "monero-wal
|
|||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
torut = { git = "https://github.com/bonomat/torut/", branch = "feature-flag-tor-secret-keys", default-features = false, features = [ "v3", "control" ] }
|
torut = { git = "https://github.com/bonomat/torut/", branch = "feature-flag-tor-secret-keys", default-features = false, features = [ "v3", "control" ] }
|
||||||
monero = { git = "https://github.com/comit-network/monero-rs", branch = "open-outputs" }
|
monero = { git = "https://github.com/comit-network/monero-rs", branch = "fix-bulletproofs" }
|
||||||
|
@ -126,10 +126,7 @@ impl ConfidentialTransactionBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn compute_pseudo_out(&mut self, commitments: Vec<EdwardsPoint>) -> EdwardsPoint {
|
fn compute_pseudo_out(&mut self, commitments: Vec<EdwardsPoint>) -> EdwardsPoint {
|
||||||
let sum_commitments = commitments
|
let sum_commitments = commitments.iter().sum::<EdwardsPoint>();
|
||||||
.iter()
|
|
||||||
.map(|p| p * Scalar::from(8u8)) // TODO: Should this happen inside the bulletproof module? => yes
|
|
||||||
.sum::<EdwardsPoint>();
|
|
||||||
|
|
||||||
let fee = self.compute_fee();
|
let fee = self.compute_fee();
|
||||||
|
|
||||||
@ -137,7 +134,6 @@ impl ConfidentialTransactionBuilder {
|
|||||||
self.base.txn_fee = VarInt(fee);
|
self.base.txn_fee = VarInt(fee);
|
||||||
self.base.out_pk = commitments
|
self.base.out_pk = commitments
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| p * Scalar::from(8u8))
|
|
||||||
.map(|p| CtKey {
|
.map(|p| CtKey {
|
||||||
mask: Key {
|
mask: Key {
|
||||||
key: p.compress().0,
|
key: p.compress().0,
|
||||||
@ -220,10 +216,6 @@ impl ConfidentialTransactionBuilder {
|
|||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
|
|
||||||
let output_commitments = output_commitments
|
|
||||||
.into_iter()
|
|
||||||
.map(|p| p.decompress().unwrap())
|
|
||||||
.collect(); // TODO: Return EdwardsPoints from bulletproof lib
|
|
||||||
let pseudo_out = self.compute_pseudo_out(output_commitments); // TODO: either mutate or return
|
let pseudo_out = self.compute_pseudo_out(output_commitments); // TODO: either mutate or return
|
||||||
|
|
||||||
let mut transaction = Transaction {
|
let mut transaction = Transaction {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user