Skip to content

Commit

Permalink
feat: add global versions readable request related
Browse files Browse the repository at this point in the history
  • Loading branch information
raindust committed Apr 7, 2024
1 parent 07ffcdd commit 0ff71c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions codecs/runtime-codec/src/tapp/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ use std::collections::HashMap;

use serde::{Deserialize, Serialize};

use super::TimestampShort;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionInfo {
pub version: String,
Expand All @@ -14,3 +16,10 @@ pub struct SystemVersions {
pub client: VersionInfo,
pub enclave: VersionInfo,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GlobalVersionsReadable {
pub system_versions: SystemVersions,
pub pre_client_version_expire_at: Option<TimestampShort>,
pub pre_enclave_version_expire_at: Option<TimestampShort>,
}
10 changes: 9 additions & 1 deletion system-actors/src/tappstore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use tea_runtime_codec::tapp::{
seat::SeatMaintainer,
statement::TypedStatement,
sys::FreezeRequest,
version::SystemVersions,
version::{GlobalVersionsReadable, SystemVersions},
Account, AuthKey, Hash, TokenId,
};
use tea_runtime_codec::{
Expand Down Expand Up @@ -339,3 +339,11 @@ pub struct ListActorVersionsRequest;
#[doc(hidden)]
#[derive(Debug, Clone, Serialize, Deserialize, TypeId)]
pub struct ListActorVersionsResponse(pub HashMap<String, String>);

#[doc(hidden)]
#[derive(Debug, Clone, Serialize, Deserialize, TypeId)]
pub struct GlobalVersionsReadableRequest;

#[doc(hidden)]
#[derive(Debug, Clone, Serialize, Deserialize, TypeId)]
pub struct GlobalVersionsReadableResponse(pub GlobalVersionsReadable);

0 comments on commit 0ff71c7

Please sign in to comment.