mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-01 00:41:20 +00:00
Set BeaconChainHarness to return block
This is useful if you want to inspect the block.
This commit is contained in:
parent
098e63ac32
commit
a145824c51
@ -207,13 +207,13 @@ impl BeaconChainHarness {
|
|||||||
///
|
///
|
||||||
/// This is the ideal scenario for the Beacon Chain, 100% honest participation from
|
/// This is the ideal scenario for the Beacon Chain, 100% honest participation from
|
||||||
/// validators.
|
/// validators.
|
||||||
pub fn advance_chain_with_block(&mut self) {
|
pub fn advance_chain_with_block(&mut self) -> BeaconBlock {
|
||||||
self.increment_beacon_chain_slot();
|
self.increment_beacon_chain_slot();
|
||||||
|
|
||||||
// Produce a new block.
|
// Produce a new block.
|
||||||
let block = self.produce_block();
|
let block = self.produce_block();
|
||||||
debug!("Submitting block for processing...");
|
debug!("Submitting block for processing...");
|
||||||
match self.beacon_chain.process_block(block) {
|
match self.beacon_chain.process_block(block.clone()) {
|
||||||
Ok(BlockProcessingOutcome::ValidBlock(_)) => {}
|
Ok(BlockProcessingOutcome::ValidBlock(_)) => {}
|
||||||
other => panic!("block processing failed with {:?}", other),
|
other => panic!("block processing failed with {:?}", other),
|
||||||
};
|
};
|
||||||
@ -233,6 +233,8 @@ impl BeaconChainHarness {
|
|||||||
});
|
});
|
||||||
|
|
||||||
debug!("Free attestations processed.");
|
debug!("Free attestations processed.");
|
||||||
|
|
||||||
|
block
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Signs a message using some validators secret key with the `Fork` info from the latest state
|
/// Signs a message using some validators secret key with the `Fork` info from the latest state
|
||||||
|
Loading…
Reference in New Issue
Block a user