mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-24 20:47:17 +00:00
Modifly bls library to reflect recent changes
This commit is contained in:
commit
6bab62e629
34
Jenkinsfile
vendored
34
Jenkinsfile
vendored
@ -1,34 +0,0 @@
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
args '-v cargo-cache:/cache/cargocache:rw -e "CARGO_HOME=/cache/cargocache"'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'cargo build --verbose --all'
|
||||
sh 'cargo build --verbose --all --release'
|
||||
}
|
||||
}
|
||||
stage('Check') {
|
||||
steps {
|
||||
sh 'cargo fmt --all -- --check'
|
||||
// No clippy until later...
|
||||
//sh 'cargo clippy'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh 'cargo test --verbose --all'
|
||||
sh 'cargo test --verbose --all --release'
|
||||
sh 'cargo test --manifest-path eth2/state_processing/Cargo.toml --verbose \
|
||||
--release --features fake_crypto'
|
||||
sh 'cargo test --manifest-path eth2/state_processing/Cargo.toml --verbose \
|
||||
--release --features fake_crypto -- --ignored'
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ bls-aggregates = { git = "https://github.com/sigp/signature-schemes", branch = "
|
||||
cached_tree_hash = { path = "../cached_tree_hash" }
|
||||
hashing = { path = "../hashing" }
|
||||
hex = "0.3"
|
||||
rand = "0.5"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_hex = { path = "../serde_hex" }
|
||||
|
@ -1,3 +1,5 @@
|
||||
extern crate rand;
|
||||
|
||||
use super::BLS_SECRET_KEY_BYTE_SIZE;
|
||||
use bls_aggregates::SecretKey as RawSecretKey;
|
||||
use hex::encode as hex_encode;
|
||||
@ -16,7 +18,7 @@ pub struct SecretKey(RawSecretKey);
|
||||
|
||||
impl SecretKey {
|
||||
pub fn random() -> Self {
|
||||
SecretKey(RawSecretKey::random())
|
||||
SecretKey(RawSecretKey::random(&mut rand::thread_rng()))
|
||||
}
|
||||
|
||||
/// Returns the underlying point as compressed bytes.
|
||||
|
Loading…
Reference in New Issue
Block a user