theQRL / QRL

Quantum Resistant Ledger
https://theqrl.org/
MIT License
417 stars 109 forks source link

0.52.2a telnet command send (2nd error) #317

Closed FL-Riko closed 7 years ago

FL-Riko commented 7 years ago

Send does not work for normal usage telnet: send 0 430b5ac9c10d194119436d35742cca827b5ef523110766553392973ad18f9c75c4c27cfe 1.1 0

Error: 2017-10-02 16:56:43,508 |synced| CRITICAL : [TWISTED] Unhandled Error Traceback (most recent call last): File "/home/pi/.local/lib/python3.5/site-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, kw) File "/home/pi/.local/lib/python3.5/site-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, *kw) File "/home/pi/.local/lib/python3.5/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, args, kw) File "/home/pi/.local/lib/python3.5/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,*kw) --- --- File "/home/pi/.local/lib/python3.5/site-packages/twisted/internet/posixbase.py", line 597, in _doReadOrWrite why = selectable.doRead() File "/home/pi/.local/lib/python3.5/site-packages/twisted/internet/tcp.py", line 208, in doRead return self._dataReceived(data) File "/home/pi/.local/lib/python3.5/site-packages/twisted/internet/tcp.py", line 214, in _dataReceived rval = self.protocol.dataReceived(data) File "/home/pi/QRL/qrl/core/walletprotocol.py", line 340, in dataReceived if not self.parse_cmd(self.parse(data)): File "/home/pi/QRL/qrl/core/walletprotocol.py", line 231, in parse_cmd self.send_tx(args) File "/home/pi/QRL/qrl/core/walletprotocol.py", line 539, in send_tx fee = decimal.Decimal(decimal.Decimal(args[3]) 100000000).quantize(decimal.Decimal('1'), builtins.TypeError: conversion from bytes to Decimal is not supported

fr1t2 commented 7 years ago

I also found this bug after creating a new address getnewaddress then savenewaddress New wallet created fine, when I send 100 qrl from wallet '0' to '1' it gives the following error:

Wallet contents: 0['Q3605e34c94ca833a2d6e80137eb11414abace2723e5ad7b61d3c954b85c90741bdae01da', 'type:', 'XMSS', 'balance: 123.05456959 (123.05456959)', 'nonce:14 (14)', 'signatures left: 1006 (1006/1024)'] 1['Q615b4243589354592e30291d5cb472b46e78d74d93a85af17d6d1c98aa0b3d28add25ff9', 'type:', 'XMSS', 'balance: 100.0 (100.0)', 'nonce:0 (0)', 'signatures left: 1024 (1024/1024)'] send 1 0 100 0 Connection closed by foreign host.

--------------------------------qrl.log--------------------------------------

2017-10-02 22:59:30,753 |synced| CRITICAL : [TWISTED] Unhandled Error Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, kw) File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, *kw) File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, args, kw) File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,*kw) --- --- File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/internet/posixbase.py", line 597, in _doReadOrWrite why = selectable.doRead() File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/internet/tcp.py", line 208, in doRead return self._dataReceived(data) File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/internet/tcp.py", line 214, in _dataReceived rval = self.protocol.dataReceived(data) File "/home/ubuntu/QRL/qrl/core/walletprotocol.py", line 340, in dataReceived if not self.parse_cmd(self.parse(data)): File "/home/ubuntu/QRL/qrl/core/walletprotocol.py", line 231, in parse_cmd self.send_tx(args) File "/home/ubuntu/QRL/qrl/core/walletprotocol.py", line 539, in send_tx fee = decimal.Decimal(decimal.Decimal(args[3]) 100000000).quantize(decimal.Decimal('1'), builtins.TypeError: conversion from bytes to Decimal is not supported

jleni commented 7 years ago

@randomshinichi It is possible that PR #325 fixed this problem

randomshinichi commented 7 years ago

Yes, I remember encountering this error. It's fixed.