diff --git a/ethash.go b/ethash.go index 5759ef9e..34ec753c 100644 --- a/ethash.go +++ b/ethash.go @@ -173,6 +173,9 @@ func MakeDAG(blockNum uint64, test bool, dir string) *dag { C.ethash_light_get_cache(cache.light), nil, ) + if full == nil { + panic("ethash_full_new IO or memory error") + } dag := &dag{full: full} runtime.SetFinalizer(dag, freeDAG) return dag