Skip to content

Commit c63e349

Browse files
author
colinlyguo
committed
tweak
1 parent c34fc0a commit c63e349

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

eth/api.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,12 @@ func generateWitness(blockchain *core.BlockChain, block *types.Block) (*stateles
369369
return nil, fmt.Errorf("failed to validate block %d: %w", block.Number(), err)
370370
}
371371

372-
for retries := 0; retries <= 3; retries++ {
373-
err = testWitness(blockchain, block, witness)
374-
if err == nil {
372+
for retries := 0; retries < 5; retries++ {
373+
if err = testWitness(blockchain, block, witness); err == nil {
375374
return witness, nil
376375
}
377376
}
378-
return witness, testWitness(blockchain, block, witness)
377+
return witness, err
379378
}
380379

381380
func testWitness(blockchain *core.BlockChain, block *types.Block, witness *stateless.Witness) error {

0 commit comments

Comments
 (0)