-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Allow configuration of when to reseal blocks. #1460
Conversation
- Optional limit for the amount of gas transactions may have; - option to restruct transactions returned/queried to only those which have been executed.
_ => { | ||
queue.top_transactions() | ||
} | ||
let sw = self.sealing_work.lock().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyone know if this is the correct order for the lock? (it's the same as before, so should be good...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Also Move the gas limit into the transaction queue from the miner.
[ci:skip]
Looks good to me. @tomusdrw should take a look |
}; | ||
match (&self.options.pending_set, sealing_set) { | ||
(&PendingSet::AlwaysQueue, _) | (&PendingSet::SealingOrElseQueue, None) => queue.pending_hashes(), | ||
(_, sealing) => sealing.map(|s| s.transactions().iter().map(|t| t.hash()).collect()).unwrap_or(Vec::new()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sealing.map_or_else(Vec::new, |s| ...)
needs rebase |
} | ||
|
||
/// Create new instance of this Queue with specified limits | ||
pub fn with_limit(limit: usize) -> Self { | ||
pub fn with_limits(limit: usize, tx_gas_limit: U256) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to complain again, but maybe removing it from constructor would be good too? No strong feelings though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's changed by setter anyway, other stuff like minimal_gas_price,gas_limit,etc
is not here also (because there are sensible defaults / it's unbounded without negative consequences)
No description provided.