Skip to content

Commit 1de9bc0

Browse files
author
colinlyguo
committed
fix
1 parent f9abc3f commit 1de9bc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

coordinator/internal/logic/provertask/chunk_prover_task.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ func (cp *ChunkProverTask) formatProverTask(ctx context.Context, task *orm.Prove
214214

215215
var blockHashes []common.Hash
216216
for _, block := range blocks {
217-
blockHashes = append(blockHashes, block.Header.Hash())
217+
if block.Header.Number.Uint64() == 0 {
218+
return nil, fmt.Errorf("failed to fetch block hashes of a chunk, chunk hash:%s, block number is 0", task.TaskID)
219+
}
220+
log.Info("get block hash of chunk task", "number", block.Header.Number.Uint64()-1, "hash", block.Header.ParentHash)
221+
blockHashes = append(blockHashes, block.Header.ParentHash)
218222
}
219223

220224
taskDetail := message.ChunkTaskDetail{

0 commit comments

Comments
 (0)