Remove AuxiliaryData/AuxiliaryRequest (#11533)

* Remove AuxiliaryRequest
Remove bytes member from AuxiliaryData

* Remove AuxiliaryData

* Address review grumbles
This commit is contained in:
David
2020-03-03 15:17:37 +01:00
committed by GitHub
parent 0c385de921
commit 7d54e9258d
12 changed files with 44 additions and 100 deletions

View File

@@ -26,9 +26,10 @@ use common_types::{
SealingState,
Seal,
params::CommonParams,
machine::{AuxiliaryData, Call},
machine::Call,
},
errors::{EngineError, BlockError, EthcoreError as Error},
receipt::Receipt,
};
use client_traits::EngineClient;
use ethereum_types::{H256, H520};
@@ -142,16 +143,16 @@ impl Engine for BasicAuthority {
}
#[cfg(not(any(test, feature = "test-helpers")))]
fn signals_epoch_end(&self, _header: &Header, _auxiliary: AuxiliaryData) -> engine::EpochChange {
fn signals_epoch_end(&self, _header: &Header, _receipts: Option<&[Receipt]>) -> engine::EpochChange {
// don't bother signalling even though a contract might try.
engine::EpochChange::No
}
#[cfg(any(test, feature = "test-helpers"))]
fn signals_epoch_end(&self, header: &Header, auxiliary: AuxiliaryData) -> engine::EpochChange {
fn signals_epoch_end(&self, header: &Header, receipts: Option<&[Receipt]>) -> engine::EpochChange {
// in test mode, always signal even though they don't be finalized.
let first = header.number() == 0;
self.validators.signals_epoch_end(first, header, auxiliary)
self.validators.signals_epoch_end(first, header, receipts)
}
fn is_epoch_end(