jl777 7 years ago
parent
commit
1db6bbab95
  1. 6
      iguana/segwit_addr.c

6
iguana/segwit_addr.c

@ -108,10 +108,12 @@ int bech32_encode(char *output, const char *hrp, const uint8_t *data, size_t dat
} }
chk ^= 1; chk ^= 1;
for (i = 0; i < chklen; ++i) { for (i = 0; i < chklen; ++i) {
*(output++) = charset[(chk >> ((checklen - 1 - i) * 5)) & 0x1f]; *output = charset[(chk >> ((checklen - 1 - i) * 5)) & 0x1f];
printf("%c",*output);
output++;
} }
*output = 0; *output = 0;
printf("checksum %llx\n",(long long)chk); printf(" checksum %llx\n",(long long)chk);
return 1; return 1;
} }

Loading…
Cancel
Save