Bump bpf-tools version to 1.12

This commit is contained in:
Dmitri Makarov
2021-06-24 16:34:45 -07:00
committed by Dmitri Makarov
parent c045f1dfb5
commit e98a7504f2
3 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,8 @@
*/
#include <solana_sdk.h>
extern double log2(double arg);
extern uint64_t entrypoint(const uint8_t *input) {
SolAccountInfo ka[1];
SolParameters params = (SolParameters) { .ka = ka };
@ -23,5 +25,9 @@ extern uint64_t entrypoint(const uint8_t *input) {
value /= -2.0;
sol_assert(value < 0.0);
/* test that standard math functions are available */
value = *data + 1.0;
sol_assert(log2(value) == 1.0);
return SUCCESS;
}