mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Remove "as", except for floats as needed
Also updates Bulletproofs from C to not be length prefixed, yet rather have Rust calculate their length. Corrects an error in key_gen where self was blamed, instead of the faulty participant.
This commit is contained in:
@@ -62,10 +62,8 @@ extern "C" {
|
||||
std::stringstream ss;
|
||||
binary_archive<true> ba(ss);
|
||||
::serialization::serialize(ba, bp);
|
||||
uint8_t* res = (uint8_t*) calloc(2 + ss.str().size(), 1); // malloc would also work
|
||||
memcpy(res + 2, ss.str().data(), ss.str().size());
|
||||
res[0] = ss.str().size() >> 8;
|
||||
res[1] = ss.str().size() & 255;
|
||||
uint8_t* res = (uint8_t*) calloc(ss.str().size(), 1); // malloc would also work
|
||||
memcpy(res, ss.str().data(), ss.str().size());
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user