Skip to content

Add timeout for JSON-RPC receipt polling#6

Open
samsamtrum wants to merge 1 commit into
ZhangJinHaHaHa:mainfrom
samsamtrum:fix-json-rpc-receipt-timeout
Open

Add timeout for JSON-RPC receipt polling#6
samsamtrum wants to merge 1 commit into
ZhangJinHaHaHa:mainfrom
samsamtrum:fix-json-rpc-receipt-timeout

Conversation

@samsamtrum
Copy link
Copy Markdown

Summary

  • add a configurable timeout while waiting for JSON-RPC transaction receipts
  • keep the existing 1s polling behavior, with a 120s default receipt timeout
  • cover the dropped/unmined transaction path with a regression test

Why

waitForReceipt previously polled forever when eth_getTransactionReceipt kept returning null, for example after a dropped transaction or RPC-side mempool reset. That can leave the writeback/listener path stuck indefinitely.

Test

  • npm --prefix sandbox test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant