store epoch transition proofs in DB

This commit is contained in:
Robert Habermeier
2017-04-19 14:58:19 +02:00
parent 6da6c755a5
commit a278dd5a0a
26 changed files with 234 additions and 69 deletions

View File

@@ -238,7 +238,7 @@ impl Migration for OverlayRecentV7 {
}
let mut count = 0;
for (key, value) in source.iter(None) {
for (key, value) in source.iter(None).into_iter().flat_map(|inner| inner) {
count += 1;
if count == 100_000 {
count = 0;

View File

@@ -102,7 +102,7 @@ impl Migration for ToV10 {
fn migrate(&mut self, source: Arc<Database>, config: &Config, dest: &mut Database, col: Option<u32>) -> Result<(), Error> {
let mut batch = Batch::new(config, col);
for (key, value) in source.iter(col) {
for (key, value) in source.iter(col).into_iter().flat_map(|inner| inner) {
self.progress.tick();
batch.insert(key.to_vec(), value.to_vec(), dest)?;
}

View File

@@ -59,7 +59,7 @@ impl Migration for ToV9 {
fn migrate(&mut self, source: Arc<Database>, config: &Config, dest: &mut Database, col: Option<u32>) -> Result<(), Error> {
let mut batch = Batch::new(config, self.column);
for (key, value) in source.iter(col) {
for (key, value) in source.iter(col).into_iter().flat_map(|inner| inner) {
self.progress.tick();
match self.extract {
Extract::Header => {