added option to specify base
This commit is contained in:
parent
44be18044d
commit
7ea8082fd2
@ -4,8 +4,8 @@ from hashlib import sha256
|
|||||||
|
|
||||||
|
|
||||||
class proofow:
|
class proofow:
|
||||||
def __init__(self, difficulty):
|
def __init__(self, difficulty, base=None):
|
||||||
self._base = urandom(32)
|
self._base = urandom(32) if not base else base
|
||||||
self._target = 2 ** (256 - difficulty)
|
self._target = 2 ** (256 - difficulty)
|
||||||
|
|
||||||
def work(self):
|
def work(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user