Update parameters
This commit is contained in:
parent
d0bf510651
commit
a5b79a152b
|
@ -4,14 +4,15 @@ Common methods and functions for kivy and qt.
|
||||||
|
|
||||||
import queues
|
import queues
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
|
from defaults import networkDefaultProofOfWorkNonceTrialsPerByte, networkDefaultPayloadLengthExtraBytes
|
||||||
|
|
||||||
class AddressGenerator:
|
class AddressGenerator:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def random_address_generation(
|
def random_address_generation(
|
||||||
label, streamNumberForAddress=1, eighteenByteRipe=False,
|
label, streamNumberForAddress=1, eighteenByteRipe=False,
|
||||||
nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000
|
nonceTrialsPerByte=networkDefaultProofOfWorkNonceTrialsPerByte,
|
||||||
|
payloadLengthExtraBytes=networkDefaultPayloadLengthExtraBytes
|
||||||
):
|
):
|
||||||
""""Return True if the label is unique"""
|
""""Return True if the label is unique"""
|
||||||
labels = [BMConfigParser().get(obj, 'label')
|
labels = [BMConfigParser().get(obj, 'label')
|
||||||
|
@ -37,5 +38,5 @@ class AddressGenerator:
|
||||||
elif label:
|
elif label:
|
||||||
instance.error = False
|
instance.error = False
|
||||||
else:
|
else:
|
||||||
instance.error = False
|
instance.error = True
|
||||||
instance.helper_text = 'This field is required'
|
instance.helper_text = 'This field is required'
|
||||||
|
|
Reference in New Issue
Block a user