Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

get 'map_transaction_error' return value consistent#6277

Merged
yihau merged 1 commit intosolana-labs:masterfrom
yihau:governance-test-consistent
Feb 20, 2024
Merged

get 'map_transaction_error' return value consistent#6277
yihau merged 1 commit intosolana-labs:masterfrom
yihau:governance-test-consistent

Conversation

@yihau
Copy link
Copy Markdown
Contributor

@yihau yihau commented Feb 20, 2024

the details is in the code comment 🙈 copy them here for easier reading:

// In solana-sdk v1.19.0, there is a ProgramError for
// InstructionError::IncorrectAuthority. This results in the error mapping
// returning two different values: one for sdk < v1.19 and another for sdk >= v1.19.0.
// To avoid this situation, handle InstructionError::IncorrectAuthority earlier.
// Can be removed when Solana v1.19.0 becomes a stable channel (also need to update the
// test assert for
// `test_create_program_governance_with_incorrect_upgrade_authority_error`)

@yihau yihau force-pushed the governance-test-consistent branch from 9ce468c to f98fa2b Compare February 20, 2024 13:39
@yihau yihau marked this pull request as ready for review February 20, 2024 13:51
@yihau yihau merged commit c9eb289 into solana-labs:master Feb 20, 2024
@yihau yihau deleted the governance-test-consistent branch February 20, 2024 14:48
@joncinque
Copy link
Copy Markdown
Contributor

@yihau will the sdk change break all downstream users of this error variant? If so, we should highlight it in the changelog. I can put in a PR for that

@yihau
Copy link
Copy Markdown
Contributor Author

yihau commented Feb 20, 2024

not sure if it is a breaking change. it's more like we add two more error types 🤔 the original: solana-labs/solana#35113 but I guess it won't be wrong to put more info in changelog haha

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants