Remove program error footgun and cleaner developer experience (#8042)

This commit is contained in:
Jack May
2020-01-31 10:58:07 -08:00
committed by GitHub
parent eff876881b
commit 0fd795a676
26 changed files with 127 additions and 160 deletions

View File

@@ -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, &params, 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;
}