From 92c4e9930555b04312e0d08c6c66946bc54092ce Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 4 Jan 2023 12:57:53 +0100 Subject: [PATCH] Don't write empty blobs to db --- .DS_Store | Bin 0 -> 6148 bytes beacon_node/beacon_chain/src/beacon_chain.rs | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0880474581f5c1b0059e0d9def136023232b6363 GIT binary patch literal 6148 zcmeHKyG{c!5S)b+k~;gpzkST!G3H(PZm7Ps^K7U{5_s8I??fw=}<|IbNUNdYNvQwrE>|GeMvNmW}HkMmmF=m)yzeAC@H4+@7U$HXYdTzENt dh@{MGKIeWfoDzf1c+iRZ8E{=>QsBQ8_yLAI70>_x literal 0 HcmV?d00001 diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 37d6df979..dd2be88b0 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -2945,9 +2945,11 @@ impl BeaconChain { ops.push(StoreOp::PutState(block.state_root(), &state)); if let Some(blobs) = blobs? { - //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)); + 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();