2

I'm using the testnet and as far as i can tell im doing everything right but it just wont send. The coins are old with more than 170 confirms now, the unspent output has a total of 4. I'm sending 3 to another address in my wallet and 0.5 to another address in my wallet with 0.5 as a tx fee.

When I sign it I get a hash and 'Complete:True' at the end but when I send it i get error: {"code":-22,"message":"TX rejected"}.

Here is a copy of the transaction:

{
"txid" : "de46aedbe1a2c494de1ae59f81817828b8e5cc7d9165de88c0912689e497dfeb",
"version" : 1,
"locktime" : 0,
"vin" : [
    {
        "txid" : "7fc9def2f3e52cd6ffaef52f44648c9170fef3e05ccc356a5280fbea447e9f7a",
        "vout" : 0,
        "scriptSig" : {
            "asm" : "3045022100a38d7099f34d80341d4b83ecd5f7869c30d5ab0b494999eb59308a2689e213d902201f8a3405c5444094051780e428f2ce7e94c094537cd137b848907c10264d635901 025446e16d127120ac9be07998024e63d897763ea7b5a9d08bc22790bfbe55b717",
            "hex" : "483045022100a38d7099f34d80341d4b83ecd5f7869c30d5ab0b494999eb59308a2689e213d902201f8a3405c5444094051780e428f2ce7e94c094537cd137b848907c10264d63590121025446e16d127120ac9be07998024e63d897763ea7b5a9d08bc22790bfbe55b717"
        },
        "sequence" : 4294967295
    }
],
"vout" : [
    {
        "value" : 2.00000000,
        "n" : 0,
        "scriptPubKey" : {
            "asm" : "OP_DUP OP_HASH160 95565025383b3a15b44f3aceecb0b720ef25ee47 OP_EQUALVERIFY OP_CHECKSIG",
            "hex" : "76a91495565025383b3a15b44f3aceecb0b720ef25ee4788ac",
            "reqSigs" : 1,
            "type" : "pubkeyhash",
            "addresses" : [
                "mu8aNmqV5ZGVNCrvUCxA64xEKDMEjfxYFe"
            ]
        }
    },
    {
        "value" : 0.50000000,
        "n" : 1,
        "scriptPubKey" : {
            "asm" : "OP_DUP OP_HASH160 40d3392408f0c97de32139b4dead0736e6f2b05d OP_EQUALVERIFY OP_CHECKSIG",
            "hex" : "76a91440d3392408f0c97de32139b4dead0736e6f2b05d88ac",
            "reqSigs" : 1,
            "type" : "pubkeyhash",
            "addresses" : [
                "mmRiaNorzMBgLfCHDar5okg7j1QjYMb526"
            ]
        }
    }
]

}

1

According to blockexplorer.com your output has a total of 9.9999 (and not 4) btc. If you own both vout addresses for this transaction, using only 2,5 of them in your raw transaction leaves a 7,4999 btc fee for the miners, which is insanely high.

According to bitcoin 0.9 release notes there is a mechanism now in place that:

Reject insanely high fees by default in 'sendrawtransaction'

so that could be the reason that your transaction is being rejected. Try adding one more vout to your raw transaction and see if it works.

  • I think I know what you are referring to, the transaction you can see is me sending 3btc to my test wallet and the 6.9999 being returned to my change address, I used 'sendfrom' to do that. In the new transaction I'm trying to spend the 3btc output only, is that not possible? Do i have to refer to both outputs? I will try and reduce the mining fee and update in a moment... – derrend Apr 30 '14 at 12:49
  • darn, would be nice to know what the limit is, can't find it anywhere. – derrend Apr 30 '14 at 12:52
  • 1
    fee went down and transaction was broadcast perfectly, tx - 01ea92b98d3d13db1bc164b3919ceab9c55e6d96a50f41adc93642f0a67f86fc Thanks so much for the help. I will update if I find out what the max allowed fee is :) – derrend Apr 30 '14 at 12:56

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.