From e7106278e9ec3d297fbae07e90e1b94b8e5a5976 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2020 22:14:05 +0000 Subject: [PATCH] add missing c logging stubs (#13511) (#13515) (cherry picked from commit 23c558510aac7953aee26a2529d3ee2a588d2c05) Co-authored-by: Jack May --- sdk/bpf/c/inc/solana_sdk.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/bpf/c/inc/solana_sdk.h b/sdk/bpf/c/inc/solana_sdk.h index e3350d67b9..4543fe9015 100644 --- a/sdk/bpf/c/inc/solana_sdk.h +++ b/sdk/bpf/c/inc/solana_sdk.h @@ -624,10 +624,20 @@ uint64_t entrypoint(const uint8_t *input); */ #include void sol_log_(const char *s, uint64_t len) { - printf("sol_log: %s\n", s); + printf("Program log: %s\n", s); } void sol_log_64(uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5) { - printf("sol_log_64: %llu, %llu, %llu, %llu, %llu\n", arg1, arg2, arg3, arg4, arg5); + printf("Program log: %llu, %llu, %llu, %llu, %llu\n", arg1, arg2, arg3, arg4, arg5); +} +void sol_log_pubkey(const SolPubkey *pubkey) { + printf("Program log: "); + for (int i = 0; i < SIZE_PUBKEY; i++) { + printf("%02 ", pubkey->x[i]); + } + printf("\n"); +} +void sol_log_compute_units_() { + printf("Program consumption: __ units remaining\n"); } void sol_panic_(const char *file, uint64_t len, uint64_t line, uint64_t column) { printf("Panic in %s at %d:%d\n", file, line, column);