Skip to content

[RPC] Fix status timing and the ping crash - #30

Open
Liquid369 wants to merge 1 commit into
PIVX-Project:masterfrom
Liquid369:2026_fix_rpc_ping
Open

Liquid369 wants to merge 1 commit into
PIVX-Project:masterfrom
Liquid369:2026_fix_rpc_ping

Conversation

@Liquid369

Copy link
Copy Markdown
Member

Replaces #28, keeping the ping display instead of removing it.

time.clock() was removed in Python 3.8. timeThis swallowed the AttributeError and returned (None, None), so getStatus saw block 0 and every 3.10 build reported the RPC server as unreachable.

With the clock fixed, a failed mnsync timing is None, and r_time2 != 0 let it through: r_time1 + None raised inside the RpcWatchdog slot and PyQt aborted the process. Likely the crash reported on #28. is not None there, plus a None guard on the colour thresholds, same as PIVX-SPMT#80.

5 lines, 2 files. Lint clean with CI's pins. Conflicts with #20 only on #20's comment above the same perf_counter lines.

time.clock() was removed in Python 3.8. timeThis swallowed the
AttributeError and returned (None, None), so getStatus saw block 0 and
never reported a connection on 3.10 builds.

A failed mnsync timing is None, not 0: r_time1 + None raised inside the
watchdog slot and PyQt aborted. Guard the None and keep the ping display.
@Liquid369 Liquid369 mentioned this pull request Oct 7, 2026
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