Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
boqiu committed Jun 13, 2023
1 parent bd1663a commit eefeba3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions light/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ If there're too many PoW blocks in proof, e.g. 30, client could relay partial Po
```go
proof, err := generator.CreateReceiptProofEvm(txHash)
// Handle error
for len(proof.Headers) > 30 {
index := len(proof.Headers) - 30
headers := proof.Headers[index:]
if err = relayer.RelayPoWBlocks(headers); err != nil {
maxBlocks := 30
for len(proof.Headers) > maxBlocks {
index := len(proof.Headers) - maxBlocks - 1
if err = relayer.RelayPoWBlocks(proof.Headers[index:]); err != nil {
// Handle error
}
proof.Headers = proof.Headers[:index+1]
Expand Down

0 comments on commit eefeba3

Please sign in to comment.