Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
47b5896d
Unverified
Commit
47b5896d
authored
Feb 03, 2021
by
Tomasz Drwięga
Browse files
Merge branch 'td-mmr' of github.com:paritytech/polkadot into td-mmr
parents
7515efea
d75c57c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
node/service/src/chain_spec.rs
View file @
47b5896d
...
...
@@ -838,7 +838,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
.chain
(
initial_authorities
.iter
()
.map
(|
x
|
(
x
.0
.clone
(),
STASH
)))
.collect
(),
}),
pallet_beefy
:
Some
(
rococo_runtime
::
BeefyConfig
{
pallet_beefy
:
Some
(
Default
::
default
()),
// TODO [ToDr] Beefy authorities
authorities
:
vec!
[],
}),
...
...
runtime/common/src/mmr.rs
View file @
47b5896d
...
...
@@ -24,14 +24,14 @@ use pallet_mmr::primitives::LeafDataProvider;
use
parity_scale_codec
::{
Encode
,
Decode
};
use
runtime_parachains
::
paras
;
/// A leaf that get
'
s added every block to the MMR constructed by [pallet_mmr].
/// A leaf that gets added every block to the MMR constructed by [pallet_mmr].
#[derive(RuntimeDebug,
PartialEq,
Eq,
Clone,
Encode,
Decode)]
pub
struct
MmrLeaf
<
Hash
,
MerkleRoot
>
{
/// Current block parent hash.
pub
parent_hash
:
Hash
,
/// A merkle root of all registered parachain heads.
pub
parachain_heads
:
MerkleRoot
,
/// A merkle root of the next
beefy
authority set.
/// A merkle root of the next
BEEFY
authority set.
pub
beefy_next_authority_set
:
(
ValidatorSetId
,
MerkleRoot
),
}
...
...
@@ -101,9 +101,7 @@ impl<T: Config> Module<T> where
fn
parachain_heads_merkle_root
()
->
MerkleRootOf
<
T
>
{
let
para_heads
=
paras
::
Module
::
<
T
>
::
parachains
()
.into_iter
()
.map
(|
para_id
|
{
paras
::
Module
::
<
T
>
::
para_head
(
para_id
)
})
.map
(
paras
::
Module
::
<
T
>
::
para_head
)
.map
(|
maybe_para_head
|
maybe_para_head
.encode
())
.collect
::
<
Vec
<
_
>>
();
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment