diff --git a/src/block.rs b/src/block.rs index 0794fcfc5..16ec3b7f5 100644 --- a/src/block.rs +++ b/src/block.rs @@ -250,6 +250,7 @@ pub fn enacted(rlp_bytes: &[u8], db: OverlayDB, engine: &Engine, parent: &Header let block = BlockView::new(rlp_bytes); let header = block.header_view(); let mut b = OpenBlock::new(engine, db, parent, last_hashes, header.author(), header.extra_data()); + b.set_timestamp(header.timestamp()); for t in block.transactions().into_iter() { try!(b.push_transaction(t, None)); } for u in block.uncles().into_iter() { try!(b.push_uncle(u)); } Ok(try!(b.close().seal(header.seal()))) diff --git a/src/views.rs b/src/views.rs index 3d576b5ce..8e202d0b7 100644 --- a/src/views.rs +++ b/src/views.rs @@ -122,7 +122,7 @@ impl<'a> HeaderView<'a> { pub fn gas_used(&self) -> U256 { self.rlp.val_at(10) } /// Returns timestamp. - pub fn timestamp(&self) -> usize { self.rlp.val_at(11) } + pub fn timestamp(&self) -> u64 { self.rlp.val_at(11) } /// Returns block extra data. pub fn extra_data(&self) -> Bytes { self.rlp.val_at(12) }