mirror of
https://github.com/monero-project/monero.git
synced 2025-02-10 10:28:32 -05:00
Correct in-tree code to Rust 1.69
This commit is contained in:
parent
6d6a2e4bd2
commit
c6327cc035
1
src/fcmp/fcmp_rust/Cargo.lock
generated
1
src/fcmp/fcmp_rust/Cargo.lock
generated
@ -249,6 +249,7 @@ dependencies = [
|
|||||||
"generalized-bulletproofs",
|
"generalized-bulletproofs",
|
||||||
"helioselene",
|
"helioselene",
|
||||||
"rand_core",
|
"rand_core",
|
||||||
|
"std-shims",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -8,6 +8,8 @@ name = "fcmp_rust"
|
|||||||
crate-type = ["staticlib"]
|
crate-type = ["staticlib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
std-shims = { git = "https://github.com/kayabaNerve/fcmp-plus-plus" }
|
||||||
|
|
||||||
rand_core = { version = "0.6", features = ["getrandom"] }
|
rand_core = { version = "0.6", features = ["getrandom"] }
|
||||||
|
|
||||||
transcript = { package = "flexible-transcript", git = "https://github.com/kayabaNerve/fcmp-plus-plus", features = ["recommended"] }
|
transcript = { package = "flexible-transcript", git = "https://github.com/kayabaNerve/fcmp-plus-plus", features = ["recommended"] }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use std::{io, sync::OnceLock};
|
use std_shims::sync::OnceLock;
|
||||||
|
|
||||||
use rand_core::OsRng;
|
use rand_core::OsRng;
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ pub extern "C" fn hash_grow_helios(
|
|||||||
offset: usize,
|
offset: usize,
|
||||||
existing_child_at_offset: HeliosScalar,
|
existing_child_at_offset: HeliosScalar,
|
||||||
new_children: HeliosScalarSlice,
|
new_children: HeliosScalarSlice,
|
||||||
) -> CResult<HeliosPoint, io::Error> {
|
) -> CResult<HeliosPoint, ()> {
|
||||||
let hash = hash_grow(
|
let hash = hash_grow(
|
||||||
helios_generators(),
|
helios_generators(),
|
||||||
existing_hash,
|
existing_hash,
|
||||||
@ -166,7 +166,7 @@ pub extern "C" fn hash_grow_helios(
|
|||||||
if let Some(hash) = hash {
|
if let Some(hash) = hash {
|
||||||
CResult::ok(hash)
|
CResult::ok(hash)
|
||||||
} else {
|
} else {
|
||||||
CResult::err(io::Error::new(io::ErrorKind::Other, "failed to grow hash"))
|
CResult::err(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ pub extern "C" fn hash_grow_selene(
|
|||||||
offset: usize,
|
offset: usize,
|
||||||
existing_child_at_offset: SeleneScalar,
|
existing_child_at_offset: SeleneScalar,
|
||||||
new_children: SeleneScalarSlice,
|
new_children: SeleneScalarSlice,
|
||||||
) -> CResult<SelenePoint, io::Error> {
|
) -> CResult<SelenePoint, ()> {
|
||||||
let hash = hash_grow(
|
let hash = hash_grow(
|
||||||
selene_generators(),
|
selene_generators(),
|
||||||
existing_hash,
|
existing_hash,
|
||||||
@ -213,7 +213,7 @@ pub extern "C" fn hash_grow_selene(
|
|||||||
if let Some(hash) = hash {
|
if let Some(hash) = hash {
|
||||||
CResult::ok(hash)
|
CResult::ok(hash)
|
||||||
} else {
|
} else {
|
||||||
CResult::err(io::Error::new(io::ErrorKind::Other, "failed to grow hash"))
|
CResult::err(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user