Backports for beta 2.2.5 (#10047)
* bump beta to 2.2.5 * Fix empty steps (#9939) * Don't send empty step twice or empty step then block. * Perform basic validation of locally sealed blocks. * Don't include empty step twice. * Strict empty steps validation (#10041) * Add two failings tests for strict empty steps. * Implement strict validation of empty steps. * ethcore: enable constantinople on ethereum (#10031) * ethcore: change blockreward to 2e18 for foundation after constantinople * ethcore: delay diff bomb by 2e6 blocks for foundation after constantinople * ethcore: enable eip-{145,1014,1052,1283} for foundation after constantinople * Change test miner max memory to malloc reports. (#10024) * Fix: test corpus_inaccessible panic (#10019) If system uptime is less than the duration in the test, thread will panic due to: 'overflow when subtracting duration from instant'. Changed duration to 20 seconds to make it unlikely the test will fail due to this condition. Since no operations that carry a similar risk of panic occur outside of the tests, it doesn't seem warranted to depend on an external crate to fix this. * Bump crossbeam. (#10048)
This commit is contained in:
@@ -179,14 +179,15 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn corpus_inaccessible() {
|
||||
let mut cache = Cache::new(Default::default(), Duration::from_secs(5 * 3600));
|
||||
let duration = Duration::from_secs(20);
|
||||
let mut cache = Cache::new(Default::default(), duration.clone());
|
||||
|
||||
cache.set_gas_price_corpus(vec![].into());
|
||||
assert_eq!(cache.gas_price_corpus(), Some(vec![].into()));
|
||||
|
||||
{
|
||||
let corpus_time = &mut cache.corpus.as_mut().unwrap().1;
|
||||
*corpus_time = *corpus_time - Duration::from_secs(6 * 3600);
|
||||
*corpus_time = *corpus_time - duration;
|
||||
}
|
||||
assert!(cache.gas_price_corpus().is_none());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user