3

When I try to send BTC from my Electrum wallet address to one of my unused addresses in Electrum, just as a test, it comes up with an error message (U'message':u'TX rejected, U'code':-22). I'm using electrum-1.6.2 Install version on my Windows 7 64-bit PC.

I changed the Electrum server and then the transmission worked, so I guess it was an error transmitting data to the server.

Can someone confirm that Error "22" refers to a transmission error to the server? Also, is there a list of error message numbers, so in future I can refer to the list?

1

I've been reading the source code of Electrum, and it turns out that the reason why you can't find anything about this is that it's not an Electrum error-it's an error generated by the Bitcoin client, and Electrum is just passing it along.

Now, what causes the error?

There are a bunch of ways it can happen (like trying to send a coinbase transaction), but the number one way that this can happen is if you send the same transaction twice. Unfortunatly, the current implementation of sendrawtransaction doesn't really give you any information about why.

(For those that are interested, the relevant error is on line 555 of rpcrawtransaction.cpp.

  • Thanks for interesting reply, but although I see "TX rejected" on Line 555, I can't find a reference to "code:-22". Is there a list somewhere of error messages, including "22"? – user3352 Mar 15 '13 at 13:46
  • That's what the constant RPC_DESERIALIZATION_ERROR comes out to. PS: You're looking for -22, not 22. – Nick ODell Mar 15 '13 at 16:19
  • @user3352 the codes are in github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.h – Ponkadoodle Jun 21 '13 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.