Closed JoshOrndorff closed 4 years ago
Same problem for the weight-fee-genesis.
when I add a .into()
as seen below and mark the integer as u64,
authorities: initial_authorities.iter().map(|x| (x.2.clone().into(), 1u64)).collect(),
The error message changes, claiming that there does not exist From
implemented for the same type. I can't add a trivial From
implementation from the type to the same type because it is private.
error[E0277]: the trait bound `substrate_consensus_babe_primitives::app::Public: std::convert::From<substrate_consensus_babe_primitives::app::Public>` is not satisfied
--> runtimes/super-genesis/src/lib.rs:28:65
|
28 | authorities: initial_authorities.iter().map(|x| (x.3.clone().into(), 1u64)).collect(),
| ^^^^ the trait `std::convert::From<substrate_consensus_babe_primitives::app::Public>` is not implemented for `substrate_consensus_babe_primitives::app::Public`
|
= help: the following implementations were found:
<substrate_consensus_babe_primitives::app::Public as std::convert::From<substrate_primitives::sr25519::Public>>
= note: required because of the requirements on the impl of `std::convert::Into<substrate_consensus_babe_primitives::app::Public>` for `substrate_consensus_babe_primitives::app::Public`
error[E0277]: the trait bound `substrate_finality_grandpa_primitives::app::Public: std::convert::From<substrate_finality_grandpa_primitives::app::Public>` is not satisfied
--> runtimes/super-genesis/src/lib.rs:31:65
|
31 | authorities: initial_authorities.iter().map(|x| (x.2.clone().into(), 1u64)).collect(),
| ^^^^ the trait `std::convert::From<substrate_finality_grandpa_primitives::app::Public>` is not implemented for `substrate_finality_grandpa_primitives::app::Public`
|
= help: the following implementations were found:
<substrate_finality_grandpa_primitives::app::Public as std::convert::From<substrate_primitives::ed25519::Public>>
= note: required because of the requirements on the impl of `std::convert::Into<substrate_finality_grandpa_primitives::app::Public>` for `substrate_finality_grandpa_primitives::app::Public`
error: aborting due to 2 previous errors
Here's the explanation of that error code. https://doc.rust-lang.org/error-index.html#E0277
Here's a stripped down example that seems to do the same thing but actually works. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=181862e824b8245446f16bedfa2246fc
Aha, the primitives in the genesis modules were still pulling in Substrate master.
To reproduce the issue, clone this repo, then
I can't figure out what's wrong with these lines. They are almost identical to the lines in the node template which compile just fine. https://github.com/paritytech/substrate/blob/master/bin/node-template/src/chain_spec.rs#L140