Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
Min Zhang committed Aug 10, 2021
1 parent ee6bb06 commit 4f1180e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nearcore/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl NightshadeRuntime {
epoch_manager.get_epoch_info(&epoch_id).map(|info| info.epoch_height()).map_err(Error::from)
}

fn get_epoch_id(&self, hash: &CryptoHash) -> Result<EpochId, Error> {
pub fn get_epoch_id(&self, hash: &CryptoHash) -> Result<EpochId, Error> {
let mut epoch_manager = self.epoch_manager.as_ref().write().expect(POISONED_LOCK_ERR);
epoch_manager.get_epoch_id(hash).map_err(Error::from)
}
Expand Down
2 changes: 1 addition & 1 deletion test-utils/state-viewer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ fn main() {
let state_root_vec: Vec<u8> = state_root.try_to_vec().unwrap();
if let Ok(contract_code) = runtime.view_contract_code(
shard_id as u64,
header.hash(),
&runtime.get_epoch_id(&header.hash()).unwrap(),
CryptoHash::try_from(state_root_vec).unwrap(),
&account_id.to_string().into(),
) {
Expand Down

0 comments on commit 4f1180e

Please sign in to comment.