Closed cipig closed 6 years ago
What is passing None? That's the problem, but I should handle it better
I'm about to push a fix; if this persists please let me know which coin you are using and what the client application is passing.
Unfortunately the problem is still there. The coin is KMD and the application is BarterDEX, a decentralized exchange. The problem is that BarterDEX asks the electrum-servers about transactions that are not necessarily already existent, so it could well be that the txid from the error message is not known to the electrum server. BarterDEX is doing this during a swap, when it waits for the other party to do some expected transactions before it continues with the atomic swap.
Oh, sorry, i looked wrong... it was an other coin, where i didn't updated the code... so, nevermind, my fault...
Well the lack of validation was a problem, now fixed, but it seems to me that the client (whatever it is) is where the real problem is here.
Hmmm, the fix made it worser...
Here is an example:
komodo-cli getrawtransaction "9fab67666ec927263b3e776320bbc0b6f71ddfceabb434d938012a3cc072e99d"
shows
0100000001792a612fa27ad1ba9f2a5c31198d384c90694db748ea40437c35a1ab1b611188000000006b4830450221008933318400436417f8b97e74b7374574fc965de2580c884dc7b192d0979fcdb402203c6ac6de15dd4d5bdababd514e6e669de249a7fefc184beed91406291e250fbb0121026da2fc632afabbb1b86d04a9a012db25eca74db38ba2eccd88552f27f4c0b245ffffffff028abf9b0f0000000017a914d062e5aa554041d87d5423f10e3f21bb9580ebaa875f36e929000000001976a914ed56f2feb905938b45d2e009ec14add0e7d0157288ac22ac325b
but
(echo '{ "id": 1, "method": "blockchain.transaction.get", "params": ["9fab67666ec927263b3e776320bbc0b6f71ddfceabb434d938012a3cc072e99d"] }'; sleep 0.5) | ncat electrum2.cipig.net 10001
shows
{"jsonrpc": "2.0", "error": {"code": 2, "message": "daemon error: {'code': -1, 'message': 'JSON value is not an integer as expected'}"}, "id": 1}
Can you confirm all is good with https://github.com/kyuupichan/electrumx/commit/70f8d7c4b95011d02628bba0d0773c362824b1f4
i see this error in the logs from time to time... doesn't seem to affect operation though