Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
rename BatchProof->Proof
Browse files Browse the repository at this point in the history
  • Loading branch information
Lederstrumpf committed Oct 19, 2022
1 parent 78daf69 commit 9f1bc2b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1722,11 +1722,11 @@ sp_api::impl_runtime_apis! {
fn generate_proof(
_block_numbers: Vec<BlockNumber>,
_best_known_block_number: Option<BlockNumber>,
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<Hash>), mmr::Error> {
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::Proof<Hash>), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::BatchProof<Hash>)
fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::Proof<Hash>)
-> Result<(), mmr::Error>
{
Err(mmr::Error::PalletNotIncluded)
Expand All @@ -1735,7 +1735,7 @@ sp_api::impl_runtime_apis! {
fn verify_proof_stateless(
_root: Hash,
_leaves: Vec<mmr::EncodableOpaqueLeaf>,
_proof: mmr::BatchProof<Hash>
_proof: mmr::Proof<Hash>
) -> Result<(), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1816,11 +1816,11 @@ sp_api::impl_runtime_apis! {
fn generate_proof(
_block_numbers: Vec<BlockNumber>,
_best_known_block_number: Option<BlockNumber>,
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<Hash>), mmr::Error> {
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::Proof<Hash>), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::BatchProof<Hash>)
fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::Proof<Hash>)
-> Result<(), mmr::Error>
{
Err(mmr::Error::PalletNotIncluded)
Expand All @@ -1829,7 +1829,7 @@ sp_api::impl_runtime_apis! {
fn verify_proof_stateless(
_root: Hash,
_leaves: Vec<mmr::EncodableOpaqueLeaf>,
_proof: mmr::BatchProof<Hash>
_proof: mmr::Proof<Hash>
) -> Result<(), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ sp_api::impl_runtime_apis! {
fn generate_proof(
block_numbers: Vec<BlockNumber>,
best_known_block_number: Option<BlockNumber>,
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<Hash>), mmr::Error> {
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::Proof<Hash>), mmr::Error> {
Mmr::generate_proof(block_numbers, best_known_block_number).map(
|(leaves, proof)| {
(
Expand All @@ -1712,7 +1712,7 @@ sp_api::impl_runtime_apis! {
)
}

fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::BatchProof<Hash>)
fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::Proof<Hash>)
-> Result<(), mmr::Error>
{
pub type MmrLeaf = <<Runtime as pallet_mmr::Config>::LeafData as mmr::LeafDataProvider>::LeafData;
Expand All @@ -1726,7 +1726,7 @@ sp_api::impl_runtime_apis! {
fn verify_proof_stateless(
root: Hash,
leaves: Vec<mmr::EncodableOpaqueLeaf>,
proof: mmr::BatchProof<Hash>
proof: mmr::Proof<Hash>
) -> Result<(), mmr::Error> {
let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect();
pallet_mmr::verify_leaves_proof::<MmrHashing, _>(root, nodes, proof)
Expand Down
6 changes: 3 additions & 3 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -927,11 +927,11 @@ sp_api::impl_runtime_apis! {
fn generate_proof(
_block_numbers: Vec<BlockNumber>,
_best_known_block_number: Option<BlockNumber>,
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<Hash>), mmr::Error> {
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::Proof<Hash>), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::BatchProof<Hash>)
fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::Proof<Hash>)
-> Result<(), mmr::Error>
{
Err(mmr::Error::PalletNotIncluded)
Expand All @@ -940,7 +940,7 @@ sp_api::impl_runtime_apis! {
fn verify_proof_stateless(
_root: Hash,
_leaves: Vec<mmr::EncodableOpaqueLeaf>,
_proof: mmr::BatchProof<Hash>
_proof: mmr::Proof<Hash>
) -> Result<(), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1457,11 +1457,11 @@ sp_api::impl_runtime_apis! {
fn generate_proof(
_block_numbers: Vec<BlockNumber>,
_best_known_block_number: Option<BlockNumber>,
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<Hash>), mmr::Error> {
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::Proof<Hash>), mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::BatchProof<Hash>)
fn verify_proof(_leaves: Vec<mmr::EncodableOpaqueLeaf>, _proof: mmr::Proof<Hash>)
-> Result<(), mmr::Error>
{

Expand All @@ -1471,7 +1471,7 @@ sp_api::impl_runtime_apis! {
fn verify_proof_stateless(
_root: Hash,
_leaves: Vec<mmr::EncodableOpaqueLeaf>,
_proof: mmr::BatchProof<Hash>
_proof: mmr::Proof<Hash>
) -> Result<(), mmr::Error> {

Err(mmr::Error::PalletNotIncluded)
Expand Down

0 comments on commit 9f1bc2b

Please sign in to comment.