Remove program error footgun and cleaner developer experience (#8042)
This commit is contained in:
@@ -8,12 +8,12 @@
|
||||
* Custom error for when input serialization fails
|
||||
*/
|
||||
|
||||
extern uint32_t entrypoint(const uint8_t *input) {
|
||||
extern uint64_t entrypoint(const uint8_t *input) {
|
||||
SolKeyedAccount ka[4];
|
||||
SolParameters params = (SolParameters) { .ka = ka };
|
||||
|
||||
if (!sol_deserialize(input, ¶ms, SOL_ARRAY_SIZE(ka))) {
|
||||
return INVALID_ARGUMENT;
|
||||
return ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
switch (params.data[0]) {
|
||||
@@ -48,7 +48,7 @@ extern uint32_t entrypoint(const uint8_t *input) {
|
||||
break;
|
||||
default:
|
||||
sol_log("Unrecognized command");
|
||||
return INVALID_INSTRUCTION_DATA;
|
||||
return ERROR_INVALID_INSTRUCTION_DATA;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user