dmp1ce / joinmarket-DOCKERFILE

Dockerized JoinMarket
The Unlicense
3 stars 2 forks source link

Cast to correct types in yg-env.patch #3

Closed briangordon closed 4 years ago

briangordon commented 4 years ago

If you actually pass in some of these numeric values through environment variables, scripts will fail because the values are unexpectedly strings.

Traceback (most recent call last):
  File "/jm/clientserver/jmclient/jmclient/yieldgenerator.py", line 29, in __init__
    Maker.__init__(self, wallet_service)
  File "/jm/clientserver/jmclient/jmclient/maker.py", line 32, in __init__
    self.sync_wait_loop.start(2.0)
  File "/usr/local/lib/python3.7/dist-packages/twisted/internet/task.py", line 194, in start
    self()
  File "/usr/local/lib/python3.7/dist-packages/twisted/internet/task.py", line 239, in __call__
    d = defer.maybeDeferred(self.f, *self.a, **self.kw)
--- <exception caught here> ---
  File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py", line 151, in maybeDeferred
    result = f(*args, **kw)
  File "/jm/clientserver/jmclient/jmclient/maker.py", line 44, in try_to_create_my_orders
    self.offerlist = self.create_my_orders()
  File "yg-privacyenhanced.py", line 55, in create_my_orders
    randomize_txfee = int(random.uniform(txfee * (1 - float(txfee_factor)),
builtins.TypeError: can't multiply sequence by non-int of type 'float' 
dmp1ce commented 4 years ago

I guess you discovered that I didn't actually test this patch. 🤦 Thank you for taking a look and fixing the issues.