jl777 7 years ago
parent
commit
467d242ee7
  1. 7
      iguana/segwit_addr.c

7
iguana/segwit_addr.c

@ -83,13 +83,8 @@ int bech32_encode(char *output, const char *hrp, const uint8_t *data, size_t dat
printf("bech32_encode illegal uppercase.%c\n",ch); printf("bech32_encode illegal uppercase.%c\n",ch);
return 0; return 0;
} }
if ( (c= charset_rev[ch]) < 0 )
{
printf("bech32_encode illegal base32.%d\n",ch);
return 0;
}
//chk = bech32_polymod_step(chk) ^ (ch >> 5); //chk = bech32_polymod_step(chk) ^ (ch >> 5);
chk = PolyMod_step(chk,c); chk = PolyMod_step(chk,c & 0x1f);
++i; ++i;
} }
if (i + 7 + data_len > 90) return 0; if (i + 7 + data_len > 90) return 0;

Loading…
Cancel
Save