Conversation
substrate/runtime/version/src/lib.rs
Outdated
| } | ||
|
|
||
| impl<T: Trait> Module<T> { | ||
| /// Get runtime verions |
|
|
||
| #[cfg(feature = "std")] | ||
| impl RuntimeVersion { | ||
| /// Check if this version matches other version for calling into runtime. |
There was a problem hiding this comment.
can we copy descriptions from the issue? They're pretty descriptive there...
substrate/runtime/version/src/lib.rs
Outdated
| // You should have received a copy of the GNU General Public License | ||
| // along with Substrate Demo. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| //! Version module for runtime; Provide a function that returns runtime verion. |
polkadot/runtime/src/lib.rs
Outdated
|
|
||
| /// Polkadot runtime version. | ||
| pub const VERSION: RuntimeVersion = RuntimeVersion { | ||
| spec_name: ver_str!("polkatot"), |
demo/runtime/src/lib.rs
Outdated
| /// Concrete runtime type used to parameterize the various modules. | ||
| pub struct Concrete; | ||
|
|
||
| /// Polkadot runtime version. |
| } | ||
|
|
||
| /// Invalid state data. | ||
| VersionInvalid { |
There was a problem hiding this comment.
Should just assume it's the PoC-1 runtime in this case for now, once we ditch the PoC-1 chain that assumption can be removed and this error can be reinstated.
gavofyork
left a comment
There was a problem hiding this comment.
Pending the couple of minor changes mentioned.
gavofyork
left a comment
There was a problem hiding this comment.
Withdrawing approval until it's clear that the field descriptions of the original issue were faithfully followed.
|
Addressed all issues |
|
quoting #241:
|
Why? |
|
@rphmeier I don't see why it should be checked by the polkadot API and not the substrate. Also, |
|
@gavofyork Added that last bit |
| #[cfg(feature = "std")] | ||
| #[macro_export] | ||
| macro_rules! ver_str { | ||
| ( $y:expr ) => {{ ::std::borrow::Cow::Borrowed($y) }} |
There was a problem hiding this comment.
question: why using Cow for std?
There was a problem hiding this comment.
So that it can be defined as const and deserialised from Slicable using the same type.
…tions (paritytech#256) * strip out all ICMP code and begin gossip refactor * validate incoming statements * message_allowed logic * compiles * do reporting and neighbor packet validation * tests compile * propagate gossip messages * test message_allowed * some more tests * address grumbles
* kill processes on exit and sigint * retyped events and updated api
Updated Farming commands to reflect current snapshot
Closes #241
Does not have any performance optimisations.
I've also removed
CheckedIdbecause it is now obsoleted by the version check and should be handled by the substrate, rather than polkadot anyway.