Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
0ceebe66
Commit
0ceebe66
authored
7 years ago
by
Tomasz Drwięga
Committed by
asynchronous rob
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
camel case and deny (#20)
parent
3dfafb5e
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
substrate/primitives/src/block.rs
+4
-3
4 additions, 3 deletions
substrate/primitives/src/block.rs
substrate/primitives/src/parachain.rs
+2
-1
2 additions, 1 deletion
substrate/primitives/src/parachain.rs
substrate/primitives/src/validator.rs
+2
-2
2 additions, 2 deletions
substrate/primitives/src/validator.rs
with
8 additions
and
6 deletions
substrate/primitives/src/block.rs
+
4
−
3
View file @
0ceebe66
...
...
@@ -24,12 +24,12 @@ pub type HeaderHash = H256;
/// A relay chain block header.
#[derive(Debug,
PartialEq,
Eq,
Serialize,
Deserialize)]
#[serde(rename_all
=
"camelCase"
)]
#[serde(deny_unknown_fields)]
pub
struct
Header
{
/// Block parent's hash.
#[serde(rename=
"parentHash"
)]
pub
parent_hash
:
HeaderHash
,
/// State root after this transition.
#[serde(rename=
"stateRoot"
)]
pub
state_root
:
H256
,
/// Unix time at which this header was produced.
pub
timestamp
:
u64
,
...
...
@@ -42,9 +42,10 @@ pub struct Header {
/// Included candidates should be sorted by parachain ID, and without duplicate
/// IDs.
#[derive(Debug,
PartialEq,
Eq,
Serialize,
Deserialize)]
#[serde(rename_all
=
"camelCase"
)]
#[serde(deny_unknown_fields)]
pub
struct
Body
{
/// Parachain proposal blocks.
#[serde(rename=
"paraBlocks"
)]
pub
para_blocks
:
Vec
<
parachain
::
Proposal
>
,
}
...
...
This diff is collapsed.
Click to expand it.
substrate/primitives/src/parachain.rs
+
2
−
1
View file @
0ceebe66
...
...
@@ -32,13 +32,14 @@ impl From<u64> for Id {
/// A parachain block proposal.
#[derive(Debug,
PartialEq,
Eq,
Serialize,
Deserialize)]
#[serde(rename_all
=
"camelCase"
)]
#[serde(deny_unknown_fields)]
pub
struct
Proposal
{
/// The ID of the parachain this is a proposal for.
pub
parachain
:
Id
,
/// Parachain block header bytes.
pub
header
:
Header
,
/// Hash of data necessary to prove validity of the header.
#[serde(rename=
"proofHash"
)]
pub
proof_hash
:
ProofHash
,
}
...
...
This diff is collapsed.
Click to expand it.
substrate/primitives/src/validator.rs
+
2
−
2
View file @
0ceebe66
...
...
@@ -33,11 +33,11 @@ pub struct EgressPosts(#[serde(with="bytes")] pub Vec<u8>);
/// Validity result of particular proof and ingress queue.
#[derive(Debug,
PartialEq,
Eq,
Serialize,
Deserialize)]
#[serde(tag=
"type"
,
content=
"data"
)]
#[serde(rename_all
=
"camelCase"
)]
#[serde(deny_unknown_fields)]
pub
enum
ProofValidity
{
/// The proof is invalid.
#[serde(rename=
"invalid"
)]
Invalid
,
#[serde(rename=
"valid"
)]
/// The proof is processed and new egress queue is created.
/// Also includes current ingress queue delta.
Valid
(
IngressPostsDelta
,
EgressPosts
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment