Skip to content

fix(WalletAPI): sleep between WaitTransaction retries on RPC errors - #1102

Open
cschuchardt88 wants to merge 4 commits into
neo-project:master-n3from
cschuchardt88:fix/walletapi-waittx-delay
Open

fix(WalletAPI): sleep between WaitTransaction retries on RPC errors#1102
cschuchardt88 wants to merge 4 commits into
neo-project:master-n3from
cschuchardt88:fix/walletapi-waittx-delay

Conversation

@cschuchardt88

Copy link
Copy Markdown
Member

WaitTransactionAsync swallowed GetRawTransaction failures with an empty catch and no delay. A missing transaction or persistent RPC error busy-looped the CPU until timeout.

Sleep on both unknown-tx and exception paths, with a 100ms floor, and retry until the tx has confirmations.

Independent of other PRs. RpcClient helper only; not consensus-critical.

GetRawTransaction failures were swallowed with an empty catch and no delay, so a missing tx or persistent RPC error busy-looped until timeout.
@github-actions github-actions Bot added the N3 label Aug 29, 2026
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 51.52%. Comparing base (548ae59) to head (f38109a).

Files with missing lines Patch % Lines
plugins/RpcClient/WalletAPI.cs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           master-n3    #1102      +/-   ##
=============================================
+ Coverage      51.48%   51.52%   +0.04%     
=============================================
  Files            284      284              
  Lines          16699    16703       +4     
  Branches        2148     2148              
=============================================
+ Hits            8598     8607       +9     
+ Misses          7527     7522       -5     
  Partials         574      574              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

{
// Unknown tx and transient RPC errors retry until timeout;
// sleep so a persistent failure cannot busy-loop the CPU.
await Task.Delay(pollDelay).ConfigureAwait(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use finally and do it only once?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants