Integration tests (#805)

* Started substrate tests

* Sync test

* Test updates

* Improved tests

* Use on-chain block delay

* Parallel test execution

* Otimized tests

* Logging

* Fixed racing test

* Fixed compilation

* Fixed timestamp test

* Removed rlp dependency

* Minor fixes

* Fixed tests

* Removed best_block_id and resolved fdlimit issue

* Whitespace

* Use keyring

* Style

* Added API execution setting

* Removed stale import
This commit is contained in:
Arkadiy Paronyan
2018-09-28 11:37:55 +02:00
committed by Gav Wood
parent 955a5393d8
commit 9a660f82ed
30 changed files with 590 additions and 140 deletions
+4
View File
@@ -92,6 +92,7 @@ struct BlockchainStorage<Block: BlockT> {
best_hash: Block::Hash,
best_number: NumberFor<Block>,
finalized_hash: Block::Hash,
finalized_number: NumberFor<Block>,
genesis_hash: Block::Hash,
cht_roots: HashMap<NumberFor<Block>, Block::Hash>,
leaves: LeafSet<Block::Hash, NumberFor<Block>>,
@@ -139,6 +140,7 @@ impl<Block: BlockT> Blockchain<Block> {
best_hash: Default::default(),
best_number: Zero::zero(),
finalized_hash: Default::default(),
finalized_number: Zero::zero(),
genesis_hash: Default::default(),
cht_roots: HashMap::new(),
leaves: LeafSet::new(),
@@ -206,6 +208,7 @@ impl<Block: BlockT> Blockchain<Block> {
if let NewBlockState::Final = new_state {
storage.finalized_hash = hash;
storage.finalized_number = number.clone();
}
if number == Zero::zero() {
@@ -260,6 +263,7 @@ impl<Block: BlockT> HeaderBackend<Block> for Blockchain<Block> {
best_number: storage.best_number,
genesis_hash: storage.genesis_hash,
finalized_hash: storage.finalized_hash,
finalized_number: storage.finalized_number,
})
}