pub fn note_canonical(&mut self, hash: &BlockHash, commit: &mut CommitSet<Key>) {
		trace!(target: "state-db", "Adding to pruning window: {:?} ({} inserted, {} deleted)", hash, commit.data.inserted.len(), commit.data.deleted.len());
		let inserted = commit.data.inserted.iter().map(|(k, _)| k.clone()).collect();
		let deleted = ::std::mem::replace(&mut commit.data.deleted, Vec::new());
		let journal_record = JournalRecord {
			hash: hash.clone(),
			inserted,
			deleted,
		};
		let block = self.pending_number + self.death_rows.len() as u64;
		let journal_key = to_journal_key(block);
		commit.meta.inserted.push((journal_key.clone(), journal_record.encode()));
		self.import(&journal_record.hash, journal_key, journal_record.inserted.into_iter(), journal_record.deleted);
		self.pending_canonicalizations += 1;
	}
/// Add a change set to the window. Creates a journal record and pushes it to `commit`
Add a change set to the window. Creates a journal record and pushes it to `commit`
Add a change set to the window . Creates a journal record and pushes it to ` commit `
pub fn note_canonical(&mut self, hash: &BlockHash, commit: &mut CommitSet<Key>) {
		trace!(target: "state-db", "Adding to pruning window: {:?} ({} inserted, {} deleted)", hash, commit.data.inserted.len(), commit.data.deleted.len());
		let inserted = commit.data.inserted.iter().map(|(k, _)| k.clone()).collect();
		let deleted = ::std::mem::replace(&mut commit.data.deleted, Vec::new());
		let journal_record = JournalRecord {
			hash: hash.clone(),
			inserted,
			deleted,
		};
		let block = self.pending_number + self.death_rows.len() as u64;
		let journal_key = to_journal_key(block);
		commit.meta.inserted.push((journal_key.clone(), journal_record.encode()));
		self.import(&journal_record.hash, journal_key, journal_record.inserted.into_iter(), journal_record.deleted);
		self.pending_canonicalizations += 1;
	}
pub fn note_canonical ( & mut self , hash : & BlockHash , commit : & mut CommitSet < Key > ) { trace ! ( target " " " " hash commit data inserted len ( ) commit data deleted len ( ) ) ; let inserted = commit . data . inserted . iter ( ) . map ( | ( k , _ ) | k . clone ( ) ) . collect ( ) ; let deleted = :: std :: mem :: replace ( & mut commit . data . deleted , Vec :: new ( ) ) ; let journal_record = JournalRecord { hash : hash . clone ( ) , inserted , deleted , } ; let block = self . pending_number + self . death_rows . len ( ) as u64 ; let journal_key = to_journal_key ( block ) ; commit . meta . inserted . push ( ( journal_key . clone ( ) , journal_record . encode ( ) ) ) ; self . import ( & journal_record . hash , journal_key , journal_record . inserted . into_iter ( ) , journal_record . deleted ) ; self . pending_canonicalizations += 1 ; }
Add a change set to the window.
Add a change set to the window .
&mut self
hash
&BlockHash
commit
&mut CommitSet<Key>
&mut self
hash
&BlockHash
commit
&mut CommitSet<Key>