Node
Node copied to clipboard
GH-598: second QA fix - first review
[!NOTE] Overhauls scan scheduling/error recovery and retry logic (incl. gas price computation), renames and clarifies pending-failure flows, fixes inclusive block-range math, enhances logging/tests, and updates CI to macOS latest.
- Accountant/Scanners:
- Refactor scheduling/error handling: replace
PayableSequenceScannerwithUnableToStartScanner; unifyhandle_start_scan_error; addScanReschedulingAfterEarlyStoppaths incl. Receivables;reset_scan_timer(&logger).- Receivables: auto-reschedule only when appropriate; added unreachable checks; improved UI messaging and logging.
- Pending Payables: rename caches/logs from “unfinalized” to “suspected”; harvest now accepts response skeleton; richer logs;
NothingToProcessmapped to automatic/common error.- Interval API rename:
time_until_next_scan->compute_time_to_next_scan; tests adjusted.- Retry-payable scheduling via
notify_laterwithretry_payable_scan_interval(defaults to half of payable interval).- Gas Pricing/Retry logic:
- Replace
DEFAULT_GAS_PRICE_MARGINwithDEFAULT_GAS_PRICE_RETRY_PERCENTAGEand addDEFAULT_GAS_PRICE_RETRY_CONSTANT.- Rename
increase_gas_price_by_margin->increase_by_percentage.- Retry gas price: if latest ≥ previous use percentage; otherwise increment previous by constant; retry amount uses latest payable balance; added detailed logs and tests.
- Blockchain:
- Fix inclusive block-range math (end = start + range − 1); adjust
new_start_blockexpectations.- Prevent duplicate error signaling by switching to
.theninprocess_payments.- Broaden max-block-range regex; use
transaction_count(..., None); add nonce/log warnings on batch submit.- CI:
- Update macOS runner to
macos-latest.- Tests/Utils:
- Update messages (“suspected failures”), builders (
build_with_addresses), and numerous unit/integration tests to reflect API and logic changes.Written by Cursor Bugbot for commit 06dd37499d57594de58cb200c8d1d604cedccb45. This will update automatically on new commits. Configure here.