Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mana calculations #1376

Merged
merged 26 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/src/client/api/block_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl ClientInner {

let protocol_params = self.get_protocol_parameters().await?;

Ok(BlockWrapper::build(
BlockWrapper::build(
BlockHeader::new(
protocol_params.version(),
protocol_params.network_id(),
Expand All @@ -66,6 +66,6 @@ impl ClientInner {
.finish_block()?,
)
.sign_ed25519(secret_manager, chain)
.await?)
.await
}
}
7 changes: 7 additions & 0 deletions sdk/src/types/block/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ pub enum Error {
DuplicateOutputChain(ChainId),
InvalidField(&'static str),
NullDelegationValidatorId,
InvalidEpochDelta {
created: EpochIndex,
target: EpochIndex,
},
}

#[cfg(feature = "std")]
Expand Down Expand Up @@ -375,6 +379,9 @@ impl fmt::Display for Error {
Self::DuplicateOutputChain(chain_id) => write!(f, "duplicate output chain {chain_id}"),
Self::InvalidField(field) => write!(f, "invalid field: {field}"),
Self::NullDelegationValidatorId => write!(f, "null delegation validator ID"),
Self::InvalidEpochDelta { created, target } => {
write!(f, "invalid epoch delta: created {created}, target {target}")
}
}
}
}
Expand Down
Loading
Loading