From 8b8c55828a49e88b25ad4f5bac342d2b0c949bf2 Mon Sep 17 00:00:00 2001 From: curryxbo Date: Fri, 25 Apr 2025 14:07:43 +0800 Subject: [PATCH 1/2] when not found blob return error --- node/derivation/derivation.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node/derivation/derivation.go b/node/derivation/derivation.go index 95edf84c5..48fb21e49 100644 --- a/node/derivation/derivation.go +++ b/node/derivation/derivation.go @@ -376,6 +376,8 @@ func (d *Derivation) fetchRollupDataByTxHash(txHash common.Hash, blockNumber uin d.logger.Info("Blob matching results", "matched", matchedCount, "expected", len(blobHashes)) if matchedCount > 0 { batch.Sidecar = blobTxSidecar + } else { + return nil, fmt.Errorf("no matching versionedHash was found") } } else { return nil, fmt.Errorf("not matched blob,txHash:%v,blockNumber:%v", txHash, blockNumber) From 1db52341e3b7e083a3a3666e826b01d3bca58336 Mon Sep 17 00:00:00 2001 From: curryxbo Date: Fri, 25 Apr 2025 14:10:25 +0800 Subject: [PATCH 2/2] fix error msg --- node/derivation/derivation.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/node/derivation/derivation.go b/node/derivation/derivation.go index 48fb21e49..25afbc0d9 100644 --- a/node/derivation/derivation.go +++ b/node/derivation/derivation.go @@ -374,11 +374,10 @@ func (d *Derivation) fetchRollupDataByTxHash(txHash common.Hash, blockNumber uin } d.logger.Info("Blob matching results", "matched", matchedCount, "expected", len(blobHashes)) - if matchedCount > 0 { - batch.Sidecar = blobTxSidecar - } else { + if matchedCount == 0 { return nil, fmt.Errorf("no matching versionedHash was found") } + batch.Sidecar = blobTxSidecar } else { return nil, fmt.Errorf("not matched blob,txHash:%v,blockNumber:%v", txHash, blockNumber) }