Merge pull request #2685 from karalabe/ethash-bitengdian-fix

Godeps: pull in ethash with the big endian build fix
This commit is contained in:
Péter Szilágyi 2016-06-15 13:07:46 +03:00 committed by GitHub
commit 4f3f6e28d5
4 changed files with 17 additions and 18 deletions

4
Godeps/Godeps.json generated
View File

@ -20,8 +20,8 @@
}, },
{ {
"ImportPath": "github.com/ethereum/ethash", "ImportPath": "github.com/ethereum/ethash",
"Comment": "v23.1-245-g25b32de", "Comment": "v23.1-247-g2e80de5",
"Rev": "25b32de0c0271065c28c3719c2bfe86959d72f0c" "Rev": "2e80de5022370cfe632195b1720db52d07ff8a77"
}, },
{ {
"ImportPath": "github.com/fatih/color", "ImportPath": "github.com/fatih/color",

0
Godeps/_workspace/src/github.com/ethereum/ethash/setup.py generated vendored Normal file → Executable file
View File

View File

@ -59,21 +59,20 @@
#define fix_endian32(dst_, src_) dst_ = ethash_swap_u32(src_) #define fix_endian32(dst_, src_) dst_ = ethash_swap_u32(src_)
#define fix_endian32_same(val_) val_ = ethash_swap_u32(val_) #define fix_endian32_same(val_) val_ = ethash_swap_u32(val_)
#define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_ #define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_)
#define fix_endian64_same(val_) val_ = ethash_swap_u64(val_) #define fix_endian64_same(val_) val_ = ethash_swap_u64(val_)
#define fix_endian_arr32(arr_, size_) \ #define fix_endian_arr32(arr_, size_) \
do { \ do { \
for (unsigned i_ = 0; i_ < (size_), ++i_) { \ for (unsigned i_ = 0; i_ < (size_); ++i_) { \
arr_[i_] = ethash_swap_u32(arr_[i_]); \ arr_[i_] = ethash_swap_u32(arr_[i_]); \
} \ } \
while (0) } while (0)
#define fix_endian_arr64(arr_, size_) \ #define fix_endian_arr64(arr_, size_) \
do { \ do { \
for (unsigned i_ = 0; i_ < (size_), ++i_) { \ for (unsigned i_ = 0; i_ < (size_); ++i_) { \
arr_[i_] = ethash_swap_u64(arr_[i_]); \ arr_[i_] = ethash_swap_u64(arr_[i_]); \
} \ } \
while (0) \ } while (0)
#else #else
# error "endian not supported" # error "endian not supported"
#endif // BYTE_ORDER #endif // BYTE_ORDER

View File

@ -257,7 +257,7 @@ static bool ethash_hash(
void ethash_quick_hash( void ethash_quick_hash(
ethash_h256_t* return_hash, ethash_h256_t* return_hash,
ethash_h256_t const* header_hash, ethash_h256_t const* header_hash,
uint64_t const nonce, uint64_t nonce,
ethash_h256_t const* mix_hash ethash_h256_t const* mix_hash
) )
{ {