Closed aarmoa closed 5 months ago
The recent updates focus on refining error handling and configuration options across several components. A notable enhancement includes the introduction of a condition to address "account sequence mismatch" errors selectively. This is complemented by a new function for building signed transactions. Additionally, the network loading function now supports a "local" configuration, enhancing flexibility.
File Path | Change Summary |
---|---|
client/chain/chain.go |
Introduced conditional error handling for sequence mismatches and a new function for transaction signing. |
client/common/network.go |
Updated LoadNetwork to support "local" configuration with specific settings. |
client/common/options.go |
Added a boolean field to handle sequence mismatches by default in client options. |
🐇✨ In the code where bytes dance, A rabbit tweaked the stance, Sequence checks, local nets, With a hop, no bug gets, In the burrow, all is chance. 🥕🌟
client/common/options.go (2)
`25-25`: Added `ShouldFixSequenceMismatch` field to `ClientOptions` struct to allow configuration of sequence mismatch handling. --- `32-32`: Set default value of `ShouldFixSequenceMismatch` to `true` in `DefaultClientOptions` to ensure backward compatibility.client/common/network.go (1)
`207-221`: Added a new case for "local" network configuration in `LoadNetwork` function, including specific endpoints and cookie assistants set to `DisabledCookieAssistant`.client/chain/chain.go (3)
`678-678`: Ensure proper error handling for sequence mismatch. Please verify that the error message check for "account sequence mismatch" is robust and won't accidentally trigger on similar but unrelated errors. --- `744-744`: Ensure proper error handling for sequence mismatch in asynchronous broadcasts. Please verify that the error message check for "account sequence mismatch" is robust and won't accidentally trigger on similar but unrelated errors in the asynchronous broadcast method. --- `964-964`: Check for sequence mismatch in batch broadcast. Ensure that the sequence mismatch handling in `runBatchBroadcast` is consistent with other parts of the code and correctly resets the nonce.
This PR has been created to replace https://github.com/InjectiveLabs/sdk-go/pull/213 It implements the same changes but on top of
dev
branchlocal
Network configurationSummary by CodeRabbit
New Features
LoadNetwork
function.Enhancements