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

Implement TypeInfo for Duration #183

Closed
nazar-pc opened this issue Jun 15, 2023 · 0 comments · Fixed by #184
Closed

Implement TypeInfo for Duration #183

nazar-pc opened this issue Jun 15, 2023 · 0 comments · Fixed by #184

Comments

@nazar-pc
Copy link
Contributor

Something in Substrate was merged recently, probably paritytech/substrate#13302, which made our code no longer compile with this error:

error[E0277]: the trait bound `std::time::Duration: scale_info::TypeInfo` is not satisfied
   --> crates/sp-consensus-subspace/src/lib.rs:479:1
    |
479 | / sp_api::decl_runtime_apis! {
480 | |     /// API necessary for block authorship with Subspace.
481 | |     pub trait SubspaceApi<RewardAddress: Encode + Decode> {
482 | |         /// The slot duration in milliseconds for Subspace.
...   |
534 | |     }
535 | | }
    | |_^ the trait `scale_info::TypeInfo` is not implemented for `std::time::Duration`

Encoding and decoding is supported for Duration, so TypeInfo should be too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant