Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge #1528
Browse files Browse the repository at this point in the history
1528: Problem (Fix #1527): app version not set on the first startup r=tomtau a=yihuang

Solution:
- Set version in info handler regardless of state

Co-authored-by: yihuang <[email protected]>
  • Loading branch information
bors[bot] and yihuang authored May 4, 2020
2 parents 94fe85a + 058d2c9 commit c1b4e32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain-abci/src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ impl<T: EnclaveProxy> abci::Application for ChainNodeApp<T> {
fn info(&mut self, _req: &RequestInfo) -> ResponseInfo {
info!("received info request");
let mut resp = ResponseInfo::new();
resp.app_version = chain_core::APP_VERSION;
resp.version = get_version();
if let Some(app_state) = &self.last_state {
resp.last_block_app_hash = app_state.last_apphash.to_vec();
resp.last_block_height = app_state.last_block_height.value().try_into().unwrap();
resp.app_version = chain_core::APP_VERSION;
resp.version = get_version();
resp.data = serde_json::to_string(&app_state).expect("serialize app state to json");
} else {
resp.last_block_app_hash = self.genesis_app_hash.to_vec();
Expand Down

0 comments on commit c1b4e32

Please sign in to comment.