Merge branch 'master' into v0.6.1

This commit is contained in:
Paul Hauner
2019-06-02 13:49:24 +10:00
67 changed files with 1663 additions and 1634 deletions

View File

@@ -23,6 +23,11 @@ impl TestingBeaconBlockBuilder {
}
}
/// Set the previous block root
pub fn set_previous_block_root(&mut self, root: Hash256) {
self.block.previous_block_root = root;
}
/// Set the slot of the block.
pub fn set_slot(&mut self, slot: Slot) {
self.block.slot = slot;
@@ -48,6 +53,11 @@ impl TestingBeaconBlockBuilder {
self.block.body.randao_reveal = Signature::new(&message, domain, sk);
}
/// Has the randao reveal been set?
pub fn randao_reveal_not_set(&mut self) -> bool {
self.block.body.randao_reveal.is_empty()
}
/// Inserts a signed, valid `ProposerSlashing` for the validator.
pub fn insert_proposer_slashing(
&mut self,