Fix rebase conflicts

This commit is contained in:
Emilia Hane 2023-02-06 10:24:21 +01:00
parent ba882958ed
commit 89cccfc397
No known key found for this signature in database
GPG Key ID: E73394F9C09206FA
3 changed files with 3 additions and 13 deletions

View File

@ -3044,7 +3044,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
}
let txn_lock = self.store.hot_db.begin_rw_transaction();
if let Err(e) = self.store.do_atomically(ops) {
if let Err(e) = self.store.do_atomically_with_block_and_blobs_cache(ops) {
error!(
self.log,
"Database write failed!";
@ -3080,17 +3080,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
return Err(e.into());
}
if let Some(blobs) = blobs? {
if blobs.blobs.len() > 0 {
//FIXME(sean) using this for debugging for now
info!(self.log, "Writing blobs to store"; "block_root" => ?block_root);
// WARNING! Deadlocks if the alternative to a separate blobs db is
// changed from the cold db to the hot db.
self.store.put_blobs(&block_root, (&*blobs).clone())?;
}
};
drop(txn_lock);
// The fork choice write-lock is dropped *after* the on-disk database has been updated.

View File

@ -38,7 +38,7 @@ impl<T: BeaconChainTypes> ValidatorPubkeyCache<T> {
};
let store_ops = cache.import_new_pubkeys(state)?;
store.do_atomically(store_ops)?;
store.do_atomically_with_block_and_blobs_cache(store_ops)?;
Ok(cache)
}

View File

@ -101,6 +101,7 @@ pub fn get_key_for_col(column: &str, key: &[u8]) -> Vec<u8> {
}
#[must_use]
#[derive(Clone)]
pub enum KeyValueStoreOp {
PutKeyValue(Vec<u8>, Vec<u8>),
DeleteKey(Vec<u8>),