pub fn commit_prospective(&mut self) {
		if self.committed.is_empty() {
			::std::mem::swap(&mut self.prospective, &mut self.committed);
		} else {
			for (key, val) in self.prospective.top.drain() {
				let entry = self.committed.top.entry(key).or_default();
				entry.value = val.value;

				if let Some(prospective_extrinsics) = val.extrinsics {
					entry.extrinsics.get_or_insert_with(Default::default)
						.extend(prospective_extrinsics);
				}
			}
			for (storage_key, map) in self.prospective.children.drain() {
				let entry = self.committed.children.entry(storage_key).or_default();
				entry.1.extend(map.1.iter().map(|(k, v)| (k.clone(), v.clone())));

				if let Some(prospective_extrinsics) = map.0 {
					entry.0.get_or_insert_with(Default::default)
						.extend(prospective_extrinsics);
				}
			}
		}
	}
/// Commit prospective changes to state.
Commit prospective changes to state.
Commit prospective changes to state .
pub fn commit_prospective(&mut self) {
		if self.committed.is_empty() {
			::std::mem::swap(&mut self.prospective, &mut self.committed);
		} else {
			for (key, val) in self.prospective.top.drain() {
				let entry = self.committed.top.entry(key).or_default();
				entry.value = val.value;
				if let Some(prospective_extrinsics) = val.extrinsics {
					entry.extrinsics.get_or_insert_with(Default::default)
						.extend(prospective_extrinsics);
				}
			}
			for (storage_key, map) in self.prospective.children.drain() {
				let entry = self.committed.children.entry(storage_key).or_default();
				entry.1.extend(map.1.iter().map(|(k, v)| (k.clone(), v.clone())));
				if let Some(prospective_extrinsics) = map.0 {
					entry.0.get_or_insert_with(Default::default)
						.extend(prospective_extrinsics);
				}
			}
		}
	}
pub fn commit_prospective ( & mut self ) { if self . committed . is_empty ( ) { :: std :: mem :: swap ( & mut self . prospective , & mut self . committed ) ; } else { for ( key , val ) in self . prospective . top . drain ( ) { let entry = self . committed . top . entry ( key ) . or_default ( ) ; entry . value = val . value ; if let Some ( prospective_extrinsics ) = val . extrinsics { entry . extrinsics . get_or_insert_with ( Default :: default ) . extend ( prospective_extrinsics ) ; } } for ( storage_key , map ) in self . prospective . children . drain ( ) { let entry = self . committed . children . entry ( storage_key ) . or_default ( ) ; entry . 1 . extend ( map . 1 . iter ( ) . map ( | ( k , v ) | ( k . clone ( ) , v . clone ( ) ) ) ) ; if let Some ( prospective_extrinsics ) = map . 0 { entry . 0 . get_or_insert_with ( Default :: default ) . extend ( prospective_extrinsics ) ; } } } }
Commit prospective changes to state.
Commit prospective changes to state .
&mut self
&mut self