Fix fake_crypto test fails
This commit is contained in:
parent
6234adc0d6
commit
9ffb6d0fe1
@ -130,6 +130,10 @@ fn genesis_block<T: EthSpec>(genesis_state: &BeaconState<T>, spec: &ChainSpec) -
|
|||||||
genesis_block
|
genesis_block
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Builds a genesis state as defined by the Eth2 interop procedure (see below).
|
||||||
|
///
|
||||||
|
/// Reference:
|
||||||
|
/// https://github.com/ethereum/eth2.0-pm/tree/6e41fcf383ebeb5125938850d8e9b4e9888389b4/interop/mocked_start
|
||||||
fn interop_genesis_state<T: EthSpec>(
|
fn interop_genesis_state<T: EthSpec>(
|
||||||
validator_count: usize,
|
validator_count: usize,
|
||||||
genesis_time: u64,
|
genesis_time: u64,
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#![cfg(all(test, not(feature = "fake_crypto")))]
|
#![cfg(all(test, not(feature = "fake_crypto")))]
|
||||||
|
|
||||||
use super::block_processing_builder::BlockProcessingBuilder;
|
use super::block_processing_builder::BlockProcessingBuilder;
|
||||||
use super::errors::*;
|
use super::errors::*;
|
||||||
use crate::{per_block_processing, BlockSignatureStrategy};
|
use crate::{per_block_processing, BlockSignatureStrategy};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(not(feature = "fake_crypto"))]
|
||||||
|
|
||||||
use state_processing::{
|
use state_processing::{
|
||||||
per_block_processing, test_utils::BlockBuilder, BlockProcessingError, BlockSignatureStrategy,
|
per_block_processing, test_utils::BlockBuilder, BlockProcessingError, BlockSignatureStrategy,
|
||||||
};
|
};
|
||||||
|
@ -31,6 +31,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(not(feature = "fake_crypto"))]
|
||||||
pub fn test_invalid_public_key() {
|
pub fn test_invalid_public_key() {
|
||||||
let mut public_key_bytes = [0; BLS_PUBLIC_KEY_BYTE_SIZE];
|
let mut public_key_bytes = [0; BLS_PUBLIC_KEY_BYTE_SIZE];
|
||||||
public_key_bytes[0] = 255; //a_flag1 == b_flag1 == c_flag1 == 1 and x1 = 0 shouldn't be allowed
|
public_key_bytes[0] = 255; //a_flag1 == b_flag1 == c_flag1 == 1 and x1 = 0 shouldn't be allowed
|
||||||
|
@ -32,6 +32,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(not(feature = "fake_crypto"))]
|
||||||
pub fn test_invalid_signature() {
|
pub fn test_invalid_signature() {
|
||||||
let mut signature_bytes = [0; BLS_SIG_BYTE_SIZE];
|
let mut signature_bytes = [0; BLS_SIG_BYTE_SIZE];
|
||||||
signature_bytes[0] = 255; //a_flag1 == b_flag1 == c_flag1 == 1 and x1 = 0 shouldn't be allowed
|
signature_bytes[0] = 255; //a_flag1 == b_flag1 == c_flag1 == 1 and x1 = 0 shouldn't be allowed
|
||||||
|
Loading…
Reference in New Issue
Block a user