Skip to content

Commit

Permalink
Add log for owner lock
Browse files Browse the repository at this point in the history
  • Loading branch information
XuJiandong committed Apr 26, 2024
1 parent f7e6590 commit eaeb932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CFLAGS := -g -fPIC -O3 -fno-builtin \
-Wall -Werror -Wno-nonnull -Wno-nonnull-compare -Wno-unused-function -Wno-array-bounds -Wno-stringop-overflow

# to enable log
# -DCKB_C_STDLIB_PRINTF -DCKB_C_STDLIB_PRINTF_BUFFER_SIZE=1024
CFLAGS += -DCKB_C_STDLIB_PRINTF -DCKB_C_STDLIB_PRINTF_BUFFER_SIZE=1024

LDFLAGS := -nostdlib -nostartfiles -Wl,-static -Wl,--gc-sections

Expand Down
3 changes: 3 additions & 0 deletions c/ckb_identity.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ int convert_tron_message(const uint8_t *msg, size_t msg_len, uint8_t *new_msg,
}

bool is_lock_script_hash_present(uint8_t *lock_script_hash) {
printf("is_lock_script_hash_present");
int err = 0;
size_t i = 0;
while (true) {
Expand All @@ -691,10 +692,12 @@ bool is_lock_script_hash_present(uint8_t *lock_script_hash) {
}

if (memcmp(lock_script_hash, buff, BLAKE160_SIZE) == 0) {
printf("owner lock found");
return true;
}
i += 1;
}
printf("owner lock not found");
return false;
}

Expand Down

0 comments on commit eaeb932

Please sign in to comment.