Merge pull request #544 from ethcore/uint-refact

uint to separate crate
This commit is contained in:
Gav Wood
2016-03-02 00:59:03 +01:00
30 changed files with 193 additions and 92 deletions

View File

@@ -14,8 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use util::hash::H256;
use util::uint::U256;
use util::numbers::{U256,H256};
use header::BlockNumber;
/// Best block info.

View File

@@ -14,8 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use util::hash::H256;
use util::uint::U256;
use util::numbers::{U256,H256};
use header::BlockNumber;
/// Brief info about inserted block.

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use util::hash::H256;
use util::numbers::H256;
use chainfilter::BloomIndex;
/// Represents location of block bloom in extras database.
@@ -44,7 +44,7 @@ impl BloomIndexer {
/// Calculates bloom's position in database.
pub fn location(&self, bloom_index: &BloomIndex) -> BlocksBloomLocation {
use std::{mem, ptr};
let hash = unsafe {
let mut hash: H256 = mem::zeroed();
ptr::copy(&[bloom_index.index / self.index_size] as *const usize as *const u8, hash.as_mut_ptr(), 8);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use util::hash::H256;
use util::numbers::H256;
/// Represents a tree route between `from` block and `to` block:
#[derive(Debug)]

View File

@@ -1,5 +1,5 @@
use std::collections::HashMap;
use util::hash::H256;
use util::numbers::H256;
use header::BlockNumber;
use blockchain::block_info::BlockInfo;
use extras::{BlockDetails, BlockReceipts, TransactionAddress, BlocksBlooms};