Don't write empty blobs to db

This commit is contained in:
Emilia Hane 2023-01-04 12:57:53 +01:00
parent 8a77b05c19
commit 92c4e99305
No known key found for this signature in database
GPG Key ID: E73394F9C09206FA
2 changed files with 5 additions and 3 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -2945,9 +2945,11 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
ops.push(StoreOp::PutState(block.state_root(), &state));
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);
ops.push(StoreOp::PutBlobs(block_root, blobs));
}
};
let txn_lock = self.store.hot_db.begin_rw_transaction();