Skip to content

Commit

Permalink
revert: add RawGenesisBlock to schema
Browse files Browse the repository at this point in the history
Signed-off-by: Marin Veršić <[email protected]>
  • Loading branch information
mversic committed May 3, 2024
1 parent ba46f7d commit 27f5047
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
23 changes: 23 additions & 0 deletions docs/source/references/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,14 @@
}
]
},
"GenesisTransactionBuilder": {
"Struct": [
{
"name": "isi",
"type": "Vec<InstructionBox>"
}
]
},
"Grant<PermissionToken, Account>": {
"Struct": [
{
Expand Down Expand Up @@ -3045,6 +3053,18 @@
}
]
},
"RawGenesisBlock": {
"Struct": [
{
"name": "transactions",
"type": "Vec<GenesisTransactionBuilder>"
},
{
"name": "executor",
"type": "Executor"
}
]
},
"Register<Account>": {
"Struct": [
{
Expand Down Expand Up @@ -4414,6 +4434,9 @@
"Vec<GenericPredicateBox<QueryOutputPredicate>>": {
"Vec": "GenericPredicateBox<QueryOutputPredicate>"
},
"Vec<GenesisTransactionBuilder>": {
"Vec": "GenesisTransactionBuilder"
},
"Vec<InstructionBox>": {
"Vec": "InstructionBox"
},
Expand Down
5 changes: 3 additions & 2 deletions genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use iroha_data_model::{
prelude::{Metadata, *},
ChainId,
};
use iroha_schema::IntoSchema;
use once_cell::sync::Lazy;
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -71,7 +72,7 @@ impl GenesisNetwork {
/// The initial block of the network
///
/// Use [`RawGenesisBlockFile`] to read it from a file.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, IntoSchema)]
pub struct RawGenesisBlock {
/// Transactions
transactions: Vec<GenesisTransactionBuilder>,
Expand Down Expand Up @@ -157,7 +158,7 @@ impl RawGenesisBlockFile {
}

/// Transaction for initialize settings.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, IntoSchema)]
#[serde(transparent)]
pub struct GenesisTransactionBuilder {
/// Instructions
Expand Down
3 changes: 3 additions & 0 deletions schema/gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ pub fn build_schemas() -> MetaMap {

// Never referenced, but present in type signature. Like `PhantomData<X>`
MerkleTree<SignedTransaction>,

// Genesis file - used by SDKs to generate the genesis block
iroha_genesis::RawGenesisBlock,
}
}

Expand Down

0 comments on commit 27f5047

Please sign in to comment.