Rename Ethereum Headers to AuraHeader (#354)

* Rename Header to AuraHeader

This prevents some type conflicts with the PolkadotJS Apps types.

* Fix test and benchmark builds

* Update AuraHeader in types.json
This commit is contained in:
Hernando Castano
2020-09-17 07:31:22 -04:00
committed by Bastian Köcher
parent 750a369273
commit 5163f62df4
16 changed files with 94 additions and 91 deletions
+3 -3
View File
@@ -16,7 +16,7 @@
use crate::exchange::EthereumTransactionInclusionProof;
use bp_eth_poa::{Address, Header, RawTransaction, U256};
use bp_eth_poa::{Address, AuraHeader, RawTransaction, U256};
use bp_header_chain::BaseHeaderChain;
use frame_support::RuntimeDebug;
use hex_literal::hex;
@@ -95,8 +95,8 @@ pub fn genesis_validators() -> Vec<Address> {
}
/// Genesis header of the Kovan chain.
pub fn genesis_header() -> Header {
Header {
pub fn genesis_header() -> AuraHeader {
AuraHeader {
parent_hash: Default::default(),
timestamp: 0,
number: 0,
+2 -2
View File
@@ -526,7 +526,7 @@ impl_runtime_apis! {
(finalized_block.number, finalized_block.hash)
}
fn is_import_requires_receipts(header: bp_eth_poa::Header) -> bool {
fn is_import_requires_receipts(header: bp_eth_poa::AuraHeader) -> bool {
BridgeRialto::is_import_requires_receipts(header)
}
@@ -546,7 +546,7 @@ impl_runtime_apis! {
(finalized_block.number, finalized_block.hash)
}
fn is_import_requires_receipts(header: bp_eth_poa::Header) -> bool {
fn is_import_requires_receipts(header: bp_eth_poa::AuraHeader) -> bool {
BridgeKovan::is_import_requires_receipts(header)
}
+3 -3
View File
@@ -16,7 +16,7 @@
use crate::exchange::EthereumTransactionInclusionProof;
use bp_eth_poa::{Address, Header, RawTransaction, U256};
use bp_eth_poa::{Address, AuraHeader, RawTransaction, U256};
use bp_header_chain::BaseHeaderChain;
use frame_support::RuntimeDebug;
use hex_literal::hex;
@@ -70,8 +70,8 @@ pub fn genesis_validators() -> Vec<Address> {
/// ```bash
/// $ http localhost:8545 jsonrpc=2.0 id=1 method=eth_getBlockByNumber params:='["earliest", false]' -v
/// ```
pub fn genesis_header() -> Header {
Header {
pub fn genesis_header() -> AuraHeader {
AuraHeader {
parent_hash: Default::default(),
timestamp: 0,
number: 0,