Rename on_new_block fn

This commit is contained in:
Paul Hauner
2020-01-20 07:12:52 +11:00
parent eabc2edb5f
commit dcea0b5084
2 changed files with 4 additions and 4 deletions

View File

@@ -119,10 +119,10 @@ impl ProtoArray {
Ok(())
}
/// Register a new block with the fork choice.
/// Register a block with the fork choice.
///
/// It is only sane to supply a `None` parent for the genesis block.
pub fn on_new_block(
pub fn on_block(
&mut self,
slot: Slot,
root: Hash256,

View File

@@ -74,7 +74,7 @@ impl ProtoArrayForkChoice {
};
proto_array
.on_new_block(
.on_block(
finalized_block_slot,
finalized_root,
None,
@@ -117,7 +117,7 @@ impl ProtoArrayForkChoice {
) -> Result<(), String> {
self.proto_array
.write()
.on_new_block(
.on_block(
slot,
block_root,
Some(parent_root),