Skip to content

Conversation

@arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Nov 7, 2024

PR-Codex overview

This PR focuses on improving the nonceResyncWorker functionality by adding error handling, logging, and refining the logic for recycling nonces based on the last used on-chain and database nonces.

Detailed summary

  • Added prettifyError utility for better error formatting.
  • Introduced early return if no active wallets are found.
  • Enhanced error handling with detailed logging.
  • Simplified nonce recycling logic.
  • Improved logging messages for better traceability.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

// Recycle all nonces between (onchain nonce, db nonce] if they aren't in-flight ("sent nonce").
for (
let nonce = lastUsedNonceOnchain + 1;
nonce <= lastUsedNonceDb;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only intended behavioral change: This worker should try to cancel up to lastUsedNonceDb inclusive, in case the most recent nonce is dropped/missing somehow.

@arcoraven arcoraven merged commit 32961ab into main Nov 8, 2024
5 checks passed
@arcoraven arcoraven deleted the ph/nonceResyncCleanup branch November 8, 2024 04:52
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.

2 participants