Skip to content

Commit b259ba9

Browse files
committed
Delete invalid comments and improve the code
1 parent 188d12a commit b259ba9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

c/ckb-sphincsplus-lock.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ enum SPHINCSPLUS_EXAMPLE_ERROR {
6060

6161
#ifdef CKB_VM
6262
// randombytes in sphincs+ depends on fcntl.h and unistd.h
63-
void randombytes(unsigned char *x, unsigned long long xlen) {}
63+
void randombytes(unsigned char *x, unsigned long long xlen) {
64+
ASSERT(false);
65+
}
6466
#endif // CKB_VM
6567

6668
static int extract_witness_lock(uint8_t *witness, uint64_t len,
@@ -197,9 +199,6 @@ int make_witness(WitnessArgsType *witness) {
197199
uint64_t witness_len = 0;
198200
size_t source = CKB_SOURCE_GROUP_INPUT;
199201
err = ckb_load_witness(NULL, &witness_len, 0, 0, source);
200-
// when witness is missing, empty or not accessible, make it zero length.
201-
// don't fail, because owner lock without omni doesn't require witness.
202-
// when it's zero length, any further actions on witness will fail.
203202
if (err != 0) {
204203
witness_len = 0;
205204
}

0 commit comments

Comments
 (0)