• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KarpelesLab / libwallet / 24829314022
25%

Build:
DEFAULT BRANCH: master
Ran 23 Apr 2026 10:14AM UTC
Jobs 1
Files 106
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Apr 2026 10:05AM UTC coverage: 20.027% (-0.1%) from 20.135%
24829314022

push

github

MagicalTux
wltnet: freshness-aware RPC picker for Ethereum mainnet

Bug report: a user's wallet showed 0 ETH despite holding 0.001 ETH on
mainnet (0x144f98372516a1fd3B85E327f0A988EF12c09624). The
modchain.net RPC pinned for chainId 1 was 23 days behind chain head
(block 0x17a150f vs publicnode's 0x17c9558 — ~168k blocks) and was
returning 0x0 for any account funded after its last sync. Previous
hardcode pinned modchain unconditionally with no fallback.

Replace the unconditional pin with `pickFreshestRPC` that:

  1. Fires eth_blockNumber concurrently against modchain + every
     RPC in the chain-info registry's curated list.
  2. Determines network head from the highest responder.
  3. Returns the FIRST candidate within `maxLag` blocks of head
     (preserves caller-supplied priority order — modchain stays
     preferred when healthy, falls back to the chain-info pool
     when stale).
  4. If all candidates are >maxLag behind, returns the freshest
     of them (still serves something rather than failing).
  5. If every candidate errored, returns a plain client built
     from the first candidate so the next RPC attempt surfaces
     the upstream error instead of an opaque selection failure.

`maxLag = 100` blocks ≈ 20 minutes on Ethereum's 12s block time —
absorbs normal sync drift, trips on real staleness like the
incident this fix addresses.

Polygon (chainId 137) used to pin the same modchain endpoint, but
the modchain operator removed the polygon node, so polygon now
falls through to the standard chain-info Evaluate path
(unchanged behavior aside from the missing modchain attempt).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

0 of 79 new or added lines in 1 file covered. (0.0%)

2693 of 13447 relevant lines covered (20.03%)

59.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
79
37.15
-5.31% wltnet/network.go
Jobs
ID Job ID Ran Files Coverage
1 24829314022.1 23 Apr 2026 10:14AM UTC 106
20.03
GitHub Action Run
Source Files on build 24829314022
  • Tree
  • List 106
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24829314022
  • 0022b2c3 on github
  • Prev Build on master (#24828258854)
  • Next Build on master (#24829670842)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc