Skip to content

Commit bc83b42

Browse files
authored
fix(node): fix update-config when reward.conf does not exist (#3290)
[NODE-1541](https://dfinity.atlassian.net/browse/NODE-1541) Handle the update-config case where reward.conf does not exist on the config partition. [NODE-1541]: https://dfinity.atlassian.net/browse/NODE-1541?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 8c82f7f commit bc83b42

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rs/ic_os/config/src/update_config.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,12 @@ fn read_nns_conf(config_dir: &Path) -> Result<Vec<Url>> {
189189

190190
fn read_reward_conf(config_dir: &Path) -> Result<Option<String>> {
191191
let reward_conf_path = config_dir.join("reward.conf");
192-
let conf_map = read_conf_file(&reward_conf_path)?;
192+
if !reward_conf_path.exists() {
193+
return Ok(None);
194+
}
193195

196+
let conf_map = read_conf_file(&reward_conf_path)?;
194197
let node_reward_type = conf_map.get("node_reward_type").cloned();
195-
196198
Ok(node_reward_type)
197199
}
198200

0 commit comments

Comments
 (0)