mirror of
https://github.com/monero-project/monero.git
synced 2025-02-05 05:35:20 -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",
|
||||
"helioselene",
|
||||
"rand_core",
|
||||
"std-shims",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -8,6 +8,8 @@ name = "fcmp_rust"
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
std-shims = { git = "https://github.com/kayabaNerve/fcmp-plus-plus" }
|
||||
|
||||
rand_core = { version = "0.6", features = ["getrandom"] }
|
||||
|
||||
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;
|
||||
|
||||
@ -154,7 +154,7 @@ pub extern "C" fn hash_grow_helios(
|
||||
offset: usize,
|
||||
existing_child_at_offset: HeliosScalar,
|
||||
new_children: HeliosScalarSlice,
|
||||
) -> CResult<HeliosPoint, io::Error> {
|
||||
) -> CResult<HeliosPoint, ()> {
|
||||
let hash = hash_grow(
|
||||
helios_generators(),
|
||||
existing_hash,
|
||||
@ -166,7 +166,7 @@ pub extern "C" fn hash_grow_helios(
|
||||
if let Some(hash) = hash {
|
||||
CResult::ok(hash)
|
||||
} 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,
|
||||
existing_child_at_offset: SeleneScalar,
|
||||
new_children: SeleneScalarSlice,
|
||||
) -> CResult<SelenePoint, io::Error> {
|
||||
) -> CResult<SelenePoint, ()> {
|
||||
let hash = hash_grow(
|
||||
selene_generators(),
|
||||
existing_hash,
|
||||
@ -213,7 +213,7 @@ pub extern "C" fn hash_grow_selene(
|
||||
if let Some(hash) = hash {
|
||||
CResult::ok(hash)
|
||||
} else {
|
||||
CResult::err(io::Error::new(io::ErrorKind::Other, "failed to grow hash"))
|
||||
CResult::err(())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user