Remove unused big uint utilities from plugin sdk
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "uint128.h"
|
||||
#include "uint256.h"
|
||||
#include "tokens.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
@@ -32,32 +30,6 @@ void array_hexstr(char *strbuf, const void *bin, unsigned int len) {
|
||||
*strbuf = 0; // EOS
|
||||
}
|
||||
|
||||
void convertUint64BEto128(const uint8_t *const data, uint32_t length, uint128_t *const target) {
|
||||
uint8_t tmp[INT128_LENGTH];
|
||||
int64_t value;
|
||||
|
||||
value = u64_from_BE(data, length);
|
||||
memset(tmp, ((value < 0) ? 0xff : 0), sizeof(tmp) - length);
|
||||
memmove(tmp + sizeof(tmp) - length, data, length);
|
||||
readu128BE(tmp, target);
|
||||
}
|
||||
|
||||
void convertUint128BE(const uint8_t *const data, uint32_t length, uint128_t *const target) {
|
||||
uint8_t tmp[INT128_LENGTH];
|
||||
|
||||
memset(tmp, 0, sizeof(tmp) - length);
|
||||
memmove(tmp + sizeof(tmp) - length, data, length);
|
||||
readu128BE(tmp, target);
|
||||
}
|
||||
|
||||
void convertUint256BE(const uint8_t *const data, uint32_t length, uint256_t *const target) {
|
||||
uint8_t tmp[INT256_LENGTH];
|
||||
|
||||
memset(tmp, 0, sizeof(tmp) - length);
|
||||
memmove(tmp + sizeof(tmp) - length, data, length);
|
||||
readu256BE(tmp, target);
|
||||
}
|
||||
|
||||
uint64_t u64_from_BE(const uint8_t *in, uint8_t size) {
|
||||
uint8_t i = 0;
|
||||
uint64_t res = 0;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "os.h"
|
||||
#include "cx.h"
|
||||
#include "uint256.h"
|
||||
|
||||
#define WEI_TO_ETHER 18
|
||||
|
||||
@@ -38,10 +37,6 @@ static const char HEXDIGITS[] = "0123456789abcdef";
|
||||
|
||||
void array_hexstr(char *strbuf, const void *bin, unsigned int len);
|
||||
|
||||
void convertUint128BE(const uint8_t *const data, uint32_t length, uint128_t *const target);
|
||||
void convertUint256BE(const uint8_t *const data, uint32_t length, uint256_t *const target);
|
||||
void convertUint64BEto128(const uint8_t *const data, uint32_t length, uint128_t *const target);
|
||||
|
||||
uint64_t u64_from_BE(const uint8_t *in, uint8_t size);
|
||||
|
||||
bool u64_to_string(uint64_t src, char *dst, uint8_t dst_size);
|
||||
|
||||
Reference in New Issue
Block a user