mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Add init function for BP statics
Considering they take 7 seconds to generate, thanks to #68, the ability to generate them at the start instead of on first BP is greatly appreciated. Also performs minor cleanups regarding BPs.
This commit is contained in:
@@ -57,7 +57,12 @@ fn bulletproofs_vector() {
|
||||
}
|
||||
|
||||
macro_rules! bulletproofs_tests {
|
||||
($name: ident, $max: ident, $plus: literal) => {
|
||||
($init: ident, $name: ident, $max: ident, $plus: literal) => {
|
||||
#[test]
|
||||
fn $init() {
|
||||
Bulletproofs::init($plus);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn $name() {
|
||||
// Create Bulletproofs for all possible output quantities
|
||||
@@ -86,5 +91,5 @@ macro_rules! bulletproofs_tests {
|
||||
};
|
||||
}
|
||||
|
||||
bulletproofs_tests!(bulletproofs, bulletproofs_max, false);
|
||||
bulletproofs_tests!(bulletproofs_plus, bulletproofs_plus_max, true);
|
||||
bulletproofs_tests!(bulletproofs_init, bulletproofs, bulletproofs_max, false);
|
||||
bulletproofs_tests!(bulletproofs_plus_init, bulletproofs_plus, bulletproofs_plus_max, true);
|
||||
|
||||
Reference in New Issue
Block a user