raise exception if the method is used to overwrite the existing seed
This commit is contained in:
@@ -142,6 +142,7 @@ class Wallet:
|
|||||||
|
|
||||||
|
|
||||||
def init_seed(self, seed):
|
def init_seed(self, seed):
|
||||||
|
if self.seed: raise BaseException("a seed exists")
|
||||||
if not seed:
|
if not seed:
|
||||||
seed = "%032x"%ecdsa.util.randrange( pow(2,128) )
|
seed = "%032x"%ecdsa.util.randrange( pow(2,128) )
|
||||||
self.seed = seed
|
self.seed = seed
|
||||||
|
|||||||
Reference in New Issue
Block a user