Merge changes from genesis_test and minor formatting

This commit is contained in:
Kirk Baird 2019-01-18 09:59:07 +11:00
parent 9c6c6071c0
commit a0e7f88303
No known key found for this signature in database
GPG Key ID: BF864B7ED0BEA33F
3 changed files with 5 additions and 5 deletions

View File

@ -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());
} }
} }

View File

@ -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

View File

@ -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();