Merge changes from genesis_test and minor formatting
This commit is contained in:
parent
9c6c6071c0
commit
a0e7f88303
@ -84,6 +84,6 @@ mod tests {
|
|||||||
for item in raw_sig_bytes.iter() {
|
for item in raw_sig_bytes.iter() {
|
||||||
assert!(*item == 0);
|
assert!(*item == 0);
|
||||||
}
|
}
|
||||||
assert_eq!(genesis_block.signature, Signature::empty_sig());
|
assert_eq!(genesis_block.signature, Signature::empty_signature());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ impl ChainSpec {
|
|||||||
genesis_start_shard: 0,
|
genesis_start_shard: 0,
|
||||||
far_future_slot: u64::max_value(),
|
far_future_slot: u64::max_value(),
|
||||||
zero_hash: Hash256::zero(),
|
zero_hash: Hash256::zero(),
|
||||||
empty_signature: Signature::empty_sig(),
|
empty_signature: Signature::empty_signature(),
|
||||||
bls_withdrawal_prefix_byte: 0x00,
|
bls_withdrawal_prefix_byte: 0x00,
|
||||||
/*
|
/*
|
||||||
* Time parameters
|
* Time parameters
|
||||||
|
@ -37,7 +37,7 @@ impl Signature {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new empty signature.
|
/// Returns a new empty signature.
|
||||||
pub fn empty_sig() -> Self {
|
pub fn empty_signature() -> Self {
|
||||||
let empty: Vec<u8> = vec![0; 97];
|
let empty: Vec<u8> = vec![0; 97];
|
||||||
Signature(RawSignature::from_bytes(&empty).unwrap())
|
Signature(RawSignature::from_bytes(&empty).unwrap())
|
||||||
}
|
}
|
||||||
@ -76,8 +76,8 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_empty_sig() {
|
pub fn test_empty_signature() {
|
||||||
let sig = Signature::empty_sig();
|
let sig = Signature::empty_signature();
|
||||||
|
|
||||||
let sig_as_bytes: Vec<u8> = sig.as_raw().as_bytes();
|
let sig_as_bytes: Vec<u8> = sig.as_raw().as_bytes();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user