spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.45k stars 3.09k forks source link

Error: {u'message': u'TX rejected', u'code': -22} #760

Closed jangos closed 10 years ago

jangos commented 10 years ago

Wanted to send coins, is not going through...

dabura667 commented 10 years ago

That is the generic error message.

Give us more information.

jangos commented 10 years ago

What do you need?

I used the "Send" Fomular from Electrum Wallet for a smaller amount than the suggested transaction cost^^

installed on Ubuntu

wozz commented 10 years ago

What's the amount of the output? Is it a dust transaction?

jangos commented 10 years ago

it is a mini-payment to remove Proxyban from bitcointalk.org 0.00004763 btc

dust?

the same wallet is also used on another computer (same config & ubuntu)

wozz commented 10 years ago

https://bitcoin.stackexchange.com/questions/10986/what-is-meant-by-bitcoin-dust

Yes, that's too small, it needs to be at least 0.00005430

Edit: actually, I think with the newest update, there is a new definition of dust to be 0.00000543 (since minimum tx fees for relay were lowered), so if you find a server that is updated, it may accept it.

wozz commented 10 years ago

Perhaps the tx rejected 22 error should be intercepted by the client and a message should be displayed with possible issues: fee too low, output size too small, etc. along with a message that the tx could take a long time to confirm, however trying alternate servers may allow it to be broadcasted.

jangos commented 10 years ago

Thanks for the update & answers.

I did similar transaction before and on the other notebook the same transaction just went through.

wozz commented 10 years ago

right, it's dependent on the server settings. if you really need to send this small transaction, try connecting to another server.

ecdsa commented 10 years ago

note: I have seen a few weeks ago that the bitcoind developers plan to output more descriptive error messages

tchalvak commented 10 years ago

Mmmm, yeah, same problem, same indecipherable error message:

error: {u'message': u'TX rejected', u'code': -22}

While trying to send 0.004 BTC (about $2.40) With a transaction fee of: 0.0002 BTC (about $0.12) To address: 1ACAJMTz31whw5gXrtdQqxjiWgPGdw5L1s

Obviously $2.40 shouldn't be considered "dust". When I raise the transaction fee to 0.001 BTC (about $0.60), I get "this transaction fee seems high, are you sure you want to spend so much on the transaction fee", and obviously I don't. So something is wrong there.

Maybe the server in use is not up to date enough, in which case that would be nice to explain in the error message/mask the generic error message, as changing the server to a different one might let the transactions go through. I did actually try changing to electrum.de but got the same error, so it seems like a systemic problem.

Regardless of the underlying source of the error, the current result is effectively a broken usability problem for the application.

EagleTM commented 10 years ago

bitcoind 0.9.2 has a feature for RPC called "sendrawtransaction: report the reject code and reason, and make it possible to re-send transactions that are already in the mempool". Electrum server could use it to query the exact reason why the tx was rejected and relay it back to the client. This would be a feature request...

ecdsa commented 10 years ago

most servers have been updated to more recent versions of bitcoind, that return better error messages. shall we close this issue?

EagleTM commented 10 years ago

yes...