aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go')
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
index 7328bc922..3c24fd239 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
+++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
@@ -31,8 +31,8 @@ import (
"time"
"unsafe"
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/pow"
)
@@ -85,7 +85,7 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params
Epoch: blockNum / epochLength,
}
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)
if err != nil {
@@ -118,7 +118,7 @@ func (pow *Ethash) UpdateCache(force bool) error {
func makeDAG(p *ParamsAndCache) *DAG {
d := &DAG{
- dag: C.malloc(p.params.full_size),
+ dag: C.malloc(C.size_t(p.params.full_size)),
file: false,
paramsAndCache: p,
}
@@ -360,8 +360,7 @@ func (pow *Ethash) Search(block pow.Block, stop <-chan struct{}) (uint64, []byte
}
func (pow *Ethash) Verify(block pow.Block) bool {
-
- return pow.verify(block.HashNoNonce(), block.MixDigest(), block.Difficulty(), block.NumberU64(), block.Nonce())
+ return pow.verify(block.HashNoNonce().Bytes(), block.MixDigest().Bytes(), block.Difficulty(), block.NumberU64(), block.Nonce())
}
func (pow *Ethash) verify(hash []byte, mixDigest []byte, difficulty *big.Int, blockNum uint64, nonce uint64) bool {