fix: update bpf sdk header
This commit is contained in:
parent
bb71529fe0
commit
add7a00ace
|
@ -3,22 +3,17 @@
|
||||||
* passed to it
|
* passed to it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sol_bpf.h>
|
#include <solana_sdk.h>
|
||||||
|
|
||||||
/**
|
|
||||||
* Number of SolKeyedAccounts expected. The program should bail if an
|
|
||||||
* unexpected number of accounts are passed to the program's entrypoint
|
|
||||||
*/
|
|
||||||
#define NUM_KA 1
|
|
||||||
|
|
||||||
extern bool entrypoint(const uint8_t *input) {
|
extern bool entrypoint(const uint8_t *input) {
|
||||||
SolKeyedAccounts ka[NUM_KA];
|
SolKeyedAccounts ka[1];
|
||||||
uint8_t *data;
|
uint64_t ka_len;
|
||||||
|
const uint8_t *data;
|
||||||
uint64_t data_len;
|
uint64_t data_len;
|
||||||
|
|
||||||
if (!sol_deserialize(input, NUM_KA, ka, &data, &data_len)) {
|
if (!sol_deserialize(input, ka, SOL_ARRAY_SIZE(ka), &ka_len, &data, &data_len)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sol_print_params(NUM_KA, ka, data, data_len);
|
sol_print_params(ka_len, ka, data, data_len);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue