good morning!!!!

Skip to content
Snippets Groups Projects
Commit 01ff0b31 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

fixed ethash

parent d8fe8f60
Branches
Tags
No related merge requests found
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
}, },
{ {
"ImportPath": "github.com/ethereum/ethash", "ImportPath": "github.com/ethereum/ethash",
"Comment": "v23.1-25-gc0429f2", "Comment": "v23.1-26-g934bb4f",
"Rev": "c0429f268b62e2238b684d4b5495f8ff24115424" "Rev": "934bb4f5060ab69d96fb6eba4b9a57facc4e160b"
}, },
{ {
"ImportPath": "github.com/ethereum/serpent-go", "ImportPath": "github.com/ethereum/serpent-go",
......
...@@ -85,7 +85,7 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params ...@@ -85,7 +85,7 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params
Epoch: blockNum / epochLength, Epoch: blockNum / epochLength,
} }
C.ethash_params_init(paramsAndCache.params, C.uint32_t(uint32(blockNum))) C.ethash_params_init(paramsAndCache.params, C.uint32_t(uint32(blockNum)))
paramsAndCache.cache.mem = C.malloc(paramsAndCache.params.cache_size) paramsAndCache.cache.mem = C.malloc(C.size_t(paramsAndCache.params.cache_size))
seedHash, err := GetSeedHash(blockNum) seedHash, err := GetSeedHash(blockNum)
if err != nil { if err != nil {
...@@ -118,7 +118,7 @@ func (pow *Ethash) UpdateCache(force bool) error { ...@@ -118,7 +118,7 @@ func (pow *Ethash) UpdateCache(force bool) error {
func makeDAG(p *ParamsAndCache) *DAG { func makeDAG(p *ParamsAndCache) *DAG {
d := &DAG{ d := &DAG{
dag: C.malloc(p.params.full_size), dag: C.malloc(C.size_t(p.params.full_size)),
file: false, file: false,
paramsAndCache: p, paramsAndCache: p,
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment