Minor bug fixes

Updates ActiveApp with IP and fixes hratls_pubkey mapping
reduced rustls logging to debug
This commit is contained in:
Noor 2025-06-17 15:23:56 +05:30
parent 39ee3cd84b
commit 8d1721ca11
Signed by: noormohammedb
GPG Key ID: D83EFB8B3B967146
3 changed files with 5 additions and 6 deletions

@ -22,6 +22,7 @@ async fn main() {
}
env_logger::builder()
.filter_level(log::LevelFilter::Trace)
.filter_module("rustls", log::LevelFilter::Debug)
.filter_module("tungstenite", log::LevelFilter::Debug)
.filter_module("tokio_tungstenite", log::LevelFilter::Debug)
.init();

@ -136,7 +136,7 @@ impl NewAppReq {
pub async fn submit(self, db: &Surreal<Client>) -> Result<(), Error> {
let locked_nano = self.locked_nano;
let tx_query = format!( "
let tx_query = format!("
BEGIN TRANSACTION;
LET $account = $account_input;
@ -153,7 +153,6 @@ impl NewAppReq {
}};
UPDATE $account SET tmp_locked += {locked_nano};
RELATE
$account
->$new_app_req
@ -164,8 +163,7 @@ impl NewAppReq {
vcpus: {}, disk_size_gb: {}, locked_nano: {locked_nano}, price_per_unit: {}, error: '',
}};
COMMIT TRANSACTION;
",
COMMIT TRANSACTION;",
self.ports, self.memory_mb, self.vcpus, self.disk_size_gb, self.price_per_unit);
log::trace!("submit_new_app_req query: {tx_query}");
@ -346,7 +344,7 @@ impl ActiveApp {
app_node: new_app_req.app_node,
app_name: new_app_req.app_name,
mapped_ports,
host_ipv4: String::new(),
host_ipv4: new_app_res.ip_address,
vcpus: new_app_req.vcpus,
memory_mb: new_app_req.memory_mb,
disk_size_gb: new_app_req.disk_size_gb,

@ -291,7 +291,7 @@ impl From<db::ActiveAppWithNode> for AppContract {
nano_per_minute: value.price_per_unit,
locked_nano: value.locked_nano,
collected_at: value.collected_at.to_rfc3339(),
hratls_pubkey: value.mr_enclave,
hratls_pubkey: value.hratls_pubkey,
public_package_mr_enclave,
app_name: value.app_name,
}