Skip to content

Commit

Permalink
Merge pull request #3501 from dusk-network/rusk-info-vm
Browse files Browse the repository at this point in the history
rusk: add `vm_config` section to `/on/node/info`
  • Loading branch information
herr-seppia authored Feb 14, 2025
2 parents 22ce185 + 2da025a commit 1eddb41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions rusk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `[vm]` config section [#3341]
- Add CONTRACT_TO_ACCOUNT inflow case on archive moonlight filtering [#3494]
- Add Dockerfile for persistent state builds [#1080]
- Add `vm_config` section to `/on/node/info` [#3341]

### Changed

Expand Down
4 changes: 4 additions & 0 deletions rusk/src/lib/http/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ impl RuskNode {
info.insert("chain_id", n_conf.kadcast_id.into());
info.insert("kadcast_address", n_conf.public_address.into());

let vm_conf = self.inner().vm_handler().read().await.vm_config.clone();
let vm_conf = serde_json::to_value(vm_conf).unwrap_or_default();
info.insert("vm_config", vm_conf);

Ok(ResponseData::new(serde_json::to_value(&info)?))
}

Expand Down

0 comments on commit 1eddb41

Please sign in to comment.