Skip to content

Commit

Permalink
fix bug for ulonglong
Browse files Browse the repository at this point in the history
  • Loading branch information
gordon-sero committed May 28, 2019
1 parent e4db08d commit 64d5832
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions consensus/ethash_hash/blake2b.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#ifndef __BLAKE2B_C_
#define __BLAKE2B_C_

//#include <stdint.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long uint64_t;
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;

#include "xxenc.c"

/**
Expand Down Expand Up @@ -239,7 +235,7 @@ static inline void blake2b(

#define _VP1 829000

static inline void hash_enter(uint8_t* o,const uint8_t* s,uint64_t height) {
static inline void hash_enter(uint8_t* o,const uint8_t* s,unsigned long long height) {
uint8_t p[16];
if(height>=_VP1) {
uint8_t s_enc[40]={0};
Expand Down Expand Up @@ -274,7 +270,7 @@ static inline void hash_enter(uint8_t* o,const uint8_t* s,uint64_t height) {

}

static inline void hash_leave(uint8_t* o,const uint8_t* s,uint64_t height) {
static inline void hash_leave(uint8_t* o,const uint8_t* s,unsigned long long height) {
uint8_t p[16];
if(height>=_VP1) {
uint8_t s_enc[96]={0};
Expand Down
1 change: 1 addition & 0 deletions consensus/ethash_hash/xxenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Public domain.
#ifndef XXENC_H
#define XXENC_H

#include <stdint.h>
#include <stdlib.h>

/*
Expand Down

0 comments on commit 64d5832

Please sign in to comment.