Decouple timestamp open-block-assignment/verification to Engine (#8305)

This commit is contained in:
Wei Tang
2018-04-05 16:11:21 +08:00
committed by André Silva
parent 811d165458
commit ff0ce70169
6 changed files with 33 additions and 15 deletions

View File

@@ -267,7 +267,7 @@ impl<'x> OpenBlock<'x> {
r.block.header.set_parent_hash(parent.hash());
r.block.header.set_number(number);
r.block.header.set_author(author);
r.block.header.set_timestamp_now(parent.timestamp());
r.block.header.set_timestamp(engine.open_block_header_timestamp(parent.timestamp()));
r.block.header.set_extra_data(extra_data);
let gas_floor_target = cmp::max(gas_range_target.0, engine.params().min_gas_limit);