Make Id/ID and db/Db/DB usage consistent

This commit is contained in:
debris
2016-05-19 11:00:32 +02:00
parent 7d873b2c81
commit 634679966e
17 changed files with 156 additions and 156 deletions

View File

@@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use util::*;
use ethcore::client::{BlockChainClient, BlockId, EachBlockWith};
use ethcore::client::{BlockChainClient, BlockID, EachBlockWith};
use chain::{SyncState};
use super::helpers::*;
@@ -26,7 +26,7 @@ fn two_peers() {
net.peer_mut(1).chain.add_blocks(1000, EachBlockWith::Uncle);
net.peer_mut(2).chain.add_blocks(1000, EachBlockWith::Uncle);
net.sync();
assert!(net.peer(0).chain.block(BlockId::Number(1000)).is_some());
assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some());
assert_eq!(net.peer(0).chain.blocks.read().unwrap().deref(), net.peer(1).chain.blocks.read().unwrap().deref());
}
@@ -60,7 +60,7 @@ fn empty_blocks() {
net.peer_mut(2).chain.add_blocks(5, with);
}
net.sync();
assert!(net.peer(0).chain.block(BlockId::Number(1000)).is_some());
assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some());
assert_eq!(net.peer(0).chain.blocks.read().unwrap().deref(), net.peer(1).chain.blocks.read().unwrap().deref());
}