Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit c694323

Browse files
author
Andronik Ordian
committed
Merge branch 'master' into dp/chore/use-upstream-rocksdb
* master: [ethcore]: apply filter when `PendingSet::AlwaysQueue` in `ready_transactions_filtered` (#11227) Update lib.rs (#11286) Don't prune ancient state when instantiating a Client (#11270) fixed verify_uncles error type (#11276) ethcore: fix rlp deprecation warnings (#11280)
2 parents 0e6b6b1 + dcb69ba commit c694323

File tree

12 files changed

+1001
-916
lines changed

12 files changed

+1001
-916
lines changed

ethcore/blockchain/src/blockchain.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,13 +1323,14 @@ impl BlockChain {
13231323
}
13241324

13251325
/// Given a block's `parent`, find every block header which represents a valid possible uncle.
1326-
pub fn find_uncle_headers(&self, parent: &H256, uncle_generations: usize) -> Option<Vec<encoded::Header>> {
1326+
pub fn find_uncle_headers(&self, parent: &H256, uncle_generations: u64) -> Option<Vec<encoded::Header>> {
13271327
self.find_uncle_hashes(parent, uncle_generations)
13281328
.map(|v| v.into_iter().filter_map(|h| self.block_header_data(&h)).collect())
13291329
}
13301330

13311331
/// Given a block's `parent`, find every block hash which represents a valid possible uncle.
1332-
pub fn find_uncle_hashes(&self, parent: &H256, uncle_generations: usize) -> Option<Vec<H256>> {
1332+
pub fn find_uncle_hashes(&self, parent: &H256, uncle_generations: u64) -> Option<Vec<H256>> {
1333+
let uncle_generations = uncle_generations as usize;
13331334
if !self.is_known(parent) {
13341335
return None;
13351336
}

ethcore/snapshot/src/account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub fn to_fat_rlps(
147147
stream.drain()
148148
};
149149
if !account_stream.append_raw_checked(&pair, 1, target_chunk_size) {
150-
account_stream.complete_unbounded_list();
150+
account_stream.finalize_unbounded_list();
151151
let stream = ::std::mem::replace(&mut account_stream, RlpStream::new_list(2));
152152
chunks.push(stream.out());
153153
target_chunk_size = max_chunk_size;
@@ -159,7 +159,7 @@ pub fn to_fat_rlps(
159159
return Err(e.into());
160160
},
161161
None => {
162-
account_stream.complete_unbounded_list();
162+
account_stream.finalize_unbounded_list();
163163
let stream = ::std::mem::replace(&mut account_stream, RlpStream::new_list(2));
164164
chunks.push(stream.out());
165165
return Ok(chunks);

ethcore/src/client/client.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,6 @@ impl Client {
800800
config,
801801
});
802802

803-
// prune old states.
804-
{
805-
let state_db = client.state_db.read().boxed_clone();
806-
let chain = client.chain.read();
807-
client.prune_ancient(state_db, &chain)?;
808-
}
809-
810803
// ensure genesis epoch proof in the DB.
811804
{
812805
let chain = client.chain.read();

0 commit comments

Comments
 (0)