commit e7510f57c0988c016e8e891076c41e6f7e0a6a1c
parent acfb13ff12712daf703e3253bad03c5bf7ce424c
Author: nolash <dev@holbrook.no>
Date: Thu, 16 Sep 2021 23:47:24 +0200
Remove redundant wasm file
Diffstat:
D | src/wasm.c | | | 41 | ----------------------------------------- |
1 file changed, 0 insertions(+), 41 deletions(-)
diff --git a/src/wasm.c b/src/wasm.c
@@ -1,41 +0,0 @@
-//#include <string.h>
-//#include <stdlib.h>
-
-#include "keccak-tiny.h"
-#include "bmt.h"
-
-extern unsigned char __heap_base;
-extern int bmt_init_ptr(bmt_t *bctx, const char *input, const size_t input_length, const char *data_length);
-extern void *malloc(size_t v);
-extern void *memcpy(void *dst, void *src, size_t c);
-extern void dlog(int p, int v);
-
-//size_t keccak_hash_heap_init(size_t outLen, size_t inLen) {
-// //return (char*)__heap_base + (1024 * 64);
-// return ()(malloc(outLen + inLen));
-//}
-
-#define HEAP_PAGE_LENGTH 1024
-unsigned char *bmt_hash_heap_init(const size_t input_length) {
- unsigned char *z = (unsigned char*)malloc(input_length);
-
- dlog(95, z);
- return z;
-}
-
-
-//int bmt_hash_heap(size_t out_offset, int in_offset, const size_t input_length, int data_length_offset) {
-int bmt_hash_heap(unsigned char *base, int out_offset, int in_offset, const size_t input_length, int data_length_offset) {
- int r;
-
- bmt_t bctx;
-
- r = bmt_init_ptr(&bctx, (const char*)(base + in_offset), input_length, (const char*)(base + data_length_offset));
- if (r != 0) {
- return r;
- }
- r = bmt_sum(&bctx);
- memcpy((char*)(__heap_base + out_offset), bctx.buf, _SWARM_WORD_SIZE);
-
- return r;
-}