Skip to content

Commit

Permalink
Network config json + Update CML to 6.0.0 (#64)
Browse files Browse the repository at this point in the history
* NetworkConfiguration JSON

Related to dcSpark/carp#187

* remove json test

* Bump CML to 6.0.0
  • Loading branch information
rooooooooob authored Aug 27, 2024
1 parent 4f0865f commit 176ea48
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions blockchain-source/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ serde = { version = "1.0.144" }
tokio = { version = "1", features = [ "full" ] }
thiserror = { version = "1.0" }
tracing = { version = "0.1" }
cml-multi-era = { git = "https://github.com/dcSpark/cardano-multiplatform-lib", rev = "8999325933c131af8ac474fe8556e585ca39659c" }
cml-chain = { git = "https://github.com/dcSpark/cardano-multiplatform-lib", rev = "8999325933c131af8ac474fe8556e585ca39659c" }
cml-core = { git = "https://github.com/dcSpark/cardano-multiplatform-lib", rev = "8999325933c131af8ac474fe8556e585ca39659c" }
cml-multi-era = { git = "https://github.com/dcSpark/cardano-multiplatform-lib", rev = "25ff92b4f6cf0f5dc98f0df3ab812a23af467e98" }
cml-chain = { git = "https://github.com/dcSpark/cardano-multiplatform-lib", rev = "25ff92b4f6cf0f5dc98f0df3ab812a23af467e98" }
cml-core = { git = "https://github.com/dcSpark/cardano-multiplatform-lib", rev = "25ff92b4f6cf0f5dc98f0df3ab812a23af467e98" }
4 changes: 3 additions & 1 deletion blockchain-source/src/cardano/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use super::{time::Era, Point};
use dcspark_core::{BlockId, SlotNumber};
use std::borrow::Cow;

#[derive(Clone, Debug)]
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[serde(deny_unknown_fields)]
pub struct NetworkConfiguration {
pub chain_info: cml_chain::genesis::network_info::NetworkInfo,
pub relay: (Cow<'static, str>, u16),
Expand Down
2 changes: 1 addition & 1 deletion blockchain-source/src/cardano/time.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const EPOCH_LENGTH_IN_SECONDS: u64 = 432000;
const BYRON_SLOT_DURATION: u64 = 20;

#[derive(Debug, Clone, serde::Deserialize)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Era {
pub first_slot: u64,
pub start_epoch: u64,
Expand Down

0 comments on commit 176ea48

Please sign in to comment.