Fix rebase conflicts

This commit is contained in:
Emilia Hane
2023-02-01 17:51:01 +01:00
parent f8c3e7fc91
commit f971f3a3a2
6 changed files with 60 additions and 57 deletions

View File

@@ -3021,7 +3021,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
ops.push(StoreOp::PutBlock(block_root, signed_block.clone()));
ops.push(StoreOp::PutState(block.state_root(), &state));
<<<<<<< HEAD
// Only consider blobs if the eip4844 fork is enabled.
if let Some(data_availability_boundary) = self.data_availability_boundary() {
let block_epoch = block.slot().epoch(T::EthSpec::slots_per_epoch());
@@ -3032,7 +3031,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
// margin, or younger (of higher epoch number).
if block_epoch >= import_boundary {
if let Some(blobs) = blobs {
if blobs.blobs.len() > 0 {
if !blobs.blobs.is_empty() {
//FIXME(sean) using this for debugging for now
info!(
self.log, "Writing blobs to store";
@@ -3041,16 +3040,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
ops.push(StoreOp::PutBlobs(block_root, blobs));
}
}
=======
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);
self.store.put_blobs(&block_root, (&*blobs).clone())?;
>>>>>>> 43dc3a9a4 (Fix rebase conflicts)
}
}
let txn_lock = self.store.hot_db.begin_rw_transaction();
if let Err(e) = self.store.do_atomically(ops) {
@@ -3089,6 +3080,17 @@ 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

@@ -1382,7 +1382,7 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
};
chain
.store
.do_atomically_and_update_cache(state_batch, None)?;
.do_atomically_with_block_and_blobs_cache(state_batch)?;
drop(txn_lock);
confirmed_state_roots.push(state_root);