Use INT256_LENGTH and ADDRESS_LENGTH define

This commit is contained in:
pscott
2021-04-30 18:22:15 +02:00
parent 0bd5fa717e
commit 5fd27ff5ca
20 changed files with 40 additions and 34 deletions

View File

@@ -36,7 +36,7 @@ void array_hexstr(char *strbuf, const void *bin, unsigned int len) {
}
void convertUint256BE(uint8_t *data, uint32_t length, uint256_t *target) {
uint8_t tmp[32];
uint8_t tmp[INT256_LENGTH];
memset(tmp, 0, 32);
memmove(tmp + 32 - length, data, length);
readu256BE(tmp, target);