mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 21:49:26 +00:00
Correct no-std builds for monero-clsag and monero-bulletproofs
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
use std_shims::{vec, vec::Vec};
|
||||||
|
|
||||||
use curve25519_dalek::{
|
use curve25519_dalek::{
|
||||||
constants::ED25519_BASEPOINT_POINT,
|
constants::ED25519_BASEPOINT_POINT,
|
||||||
traits::{IsIdentity, VartimeMultiscalarMul},
|
traits::{IsIdentity, VartimeMultiscalarMul},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std_shims::{vec::Vec, sync::OnceLock};
|
use std_shims::{vec, vec::Vec, sync::OnceLock};
|
||||||
|
|
||||||
use rand_core::{RngCore, CryptoRng};
|
use rand_core::{RngCore, CryptoRng};
|
||||||
use subtle::{Choice, ConditionallySelectable};
|
use subtle::{Choice, ConditionallySelectable};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use std_shims::{
|
use std_shims::{
|
||||||
vec::Vec,
|
vec, vec::Vec,
|
||||||
io::{self, Read, Write},
|
io::{self, Read, Write},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std_shims::{vec::Vec, sync::OnceLock};
|
use std_shims::{vec, vec::Vec, sync::OnceLock};
|
||||||
|
|
||||||
use rand_core::{RngCore, CryptoRng};
|
use rand_core::{RngCore, CryptoRng};
|
||||||
use zeroize::Zeroize;
|
use zeroize::Zeroize;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std_shims::vec::Vec;
|
use std_shims::{vec, vec::Vec};
|
||||||
|
|
||||||
use rand_core::{RngCore, CryptoRng};
|
use rand_core::{RngCore, CryptoRng};
|
||||||
use zeroize::{Zeroize, ZeroizeOnDrop, Zeroizing};
|
use zeroize::{Zeroize, ZeroizeOnDrop, Zeroizing};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std_shims::vec::Vec;
|
use std_shims::{vec, vec::Vec};
|
||||||
|
|
||||||
use rand_core::{RngCore, CryptoRng};
|
use rand_core::{RngCore, CryptoRng};
|
||||||
use zeroize::{Zeroize, ZeroizeOnDrop};
|
use zeroize::{Zeroize, ZeroizeOnDrop};
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use core::{
|
|||||||
borrow::Borrow,
|
borrow::Borrow,
|
||||||
ops::{Index, IndexMut, Add, Sub, Mul},
|
ops::{Index, IndexMut, Add, Sub, Mul},
|
||||||
};
|
};
|
||||||
use std_shims::vec::Vec;
|
use std_shims::{vec, vec::Vec};
|
||||||
|
|
||||||
use zeroize::{Zeroize, ZeroizeOnDrop};
|
use zeroize::{Zeroize, ZeroizeOnDrop};
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
use core::ops::Deref;
|
use core::ops::Deref;
|
||||||
use std_shims::{
|
use std_shims::{
|
||||||
vec::Vec,
|
vec, vec::Vec,
|
||||||
io::{self, Read, Write},
|
io::{self, Read, Write},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ fn prepare_inputs(
|
|||||||
// We now need to sort the inputs by their key image
|
// We now need to sort the inputs by their key image
|
||||||
// We take the transaction's inputs, temporarily
|
// We take the transaction's inputs, temporarily
|
||||||
let mut tx_inputs = Vec::with_capacity(inputs.len());
|
let mut tx_inputs = Vec::with_capacity(inputs.len());
|
||||||
std::mem::swap(&mut tx_inputs, &mut tx.prefix.inputs);
|
core::mem::swap(&mut tx_inputs, &mut tx.prefix.inputs);
|
||||||
|
|
||||||
// Then we join them with their signable contexts
|
// Then we join them with their signable contexts
|
||||||
let mut joint = tx_inputs.into_iter().zip(signable).collect::<Vec<_>>();
|
let mut joint = tx_inputs.into_iter().zip(signable).collect::<Vec<_>>();
|
||||||
|
|||||||
Reference in New Issue
Block a user