1

I have this raw transaction:

01000000024ae83382c185ba9a2fcaf0092bed4e8f74d31ca8eb234513c308b615fb9e3e3a000000006b48304502203ac946b370ecb43a32c3bf67598ca3ddc9818cb9efd0c6a6e68aca6e20d95b06022100841f3eed93cb955f9e1cbd26d23da3b80866872852ec5920d6ff794bd218bee40121035dea6c0ecb52807e2b7a9864c3212451e836eb0fd7cc6ba3369748825e2606f9ffffffffa3d6dc0d21402967de9431fde06d6b1cb458260d7852038035a79ec7554efcd9000000006b4830450220644bbf5a711243f679655e7ce7c193a8dde5fd110252dfdb4dd2d05d21e1b0a4022100a22c656b1e897bac71bf2d89e385eda4bdade16ca04957537fc73f903cb614d001210395676e88fe9ae950d40915df040a3610e1f42368f4a842692c24b29fd9d78a7bffffffff0330750000000000001976a9143fcf3750b81fad1cd27bae9c34feeefc278360ee88acbc0d0000000000001976a91483c1b13e99ccfc66405ef2ecb76deefca165097588ac204e0000000000001976a9147e69b1309dde4be2e39e1956ace0fa95db0d01b488ac00000000

It signed and ready to go

{
    "txid" : "adae77fd1c5cc3ae4429217ea0d84e67ac6f198543374356cc531350b3ad217b",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "3a3e9efb15b608c3134523eba81cd3748f4eed2b09f0ca2f9aba85c18233e84a",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "304502203ac946b370ecb43a32c3bf67598ca3ddc9818cb9efd0c6a6e68aca6e20d95b06022100841f3eed93cb955f9e1cbd26d23da3b80866872852ec5920d6ff794bd218bee401 035dea6c0ecb52807e2b7a9864c3212451e836eb0fd7cc6ba3369748825e2606f9",
                "hex" : "48304502203ac946b370ecb43a32c3bf67598ca3ddc9818cb9efd0c6a6e68aca6e20d95b06022100841f3eed93cb955f9e1cbd26d23da3b80866872852ec5920d6ff794bd218bee40121035dea6c0ecb52807e2b7a9864c3212451e836eb0fd7cc6ba3369748825e2606f9"
            },
            "sequence" : 4294967295
        },
        {
            "txid" : "d9fc4e55c79ea735800352780d2658b41c6b6de0fd3194de672940210ddcd6a3",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "30450220644bbf5a711243f679655e7ce7c193a8dde5fd110252dfdb4dd2d05d21e1b0a4022100a22c656b1e897bac71bf2d89e385eda4bdade16ca04957537fc73f903cb614d001 0395676e88fe9ae950d40915df040a3610e1f42368f4a842692c24b29fd9d78a7b",
                "hex" : "4830450220644bbf5a711243f679655e7ce7c193a8dde5fd110252dfdb4dd2d05d21e1b0a4022100a22c656b1e897bac71bf2d89e385eda4bdade16ca04957537fc73f903cb614d001210395676e88fe9ae950d40915df040a3610e1f42368f4a842692c24b29fd9d78a7b"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00030000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 3fcf3750b81fad1cd27bae9c34feeefc278360ee OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9143fcf3750b81fad1cd27bae9c34feeefc278360ee88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "16pPoiDcGU8P9PcqBqnZGc6SJqeuyLEDEX"
                ]
            }
        },
        {
            "value" : 0.00003516,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 83c1b13e99ccfc66405ef2ecb76deefca1650975 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a91483c1b13e99ccfc66405ef2ecb76deefca165097588ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1D1fZ7SPBtDZ4iVy9Ut5Dg5rv7PChc6PHv"
                ]
            }
        },
        {
            "value" : 0.00020000,
            "n" : 2,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 7e69b1309dde4be2e39e1956ace0fa95db0d01b4 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9147e69b1309dde4be2e39e1956ace0fa95db0d01b488ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1CXQknoy7hvc4sVnQxCL2LnGZQ6C8H4yU8"
                ]
            }
        }
    ]
}

But when I try to broadcast it to blockchain through sendrawtransaction it doesn't work: error: {"code":-22,"message":"TX rejected"}

Why? What's wrong with transaction? If you take a look on inputs and outputs you can see everything is look correct. I really don't understand why...

Please advise how to fix it and make it works.

Update: Wait a minute! I just found this post Why is a transaction with outputs of less than ฿0.00005460 rejected? ... It means if my change below then some "dust" value in BTC I can't send it???

But this is not dust. This is my change!

So how to keep my change less then 5460 satoshis? What is solution?

  • Looks like your tx is in blockchain now blockchain.info/tx/… – Zergatul Jan 30 '14 at 11:26
  • Yes but output values is different if you noticed. – Arsenius Feb 1 '14 at 9:05
  • 1
    @Arsenius the solution is, when your app notices that change is equal or less than the dust limit, you add one more unspent output of any size from your wallet and consolidate it with the dust output, effectively sending it back to your wallet. – George Kimionis Apr 30 '14 at 12:22
  • @GeorgeKimionis I never use unspent output and first time hear it from you. Would you mind to give me some example how to use it properly? – Arsenius May 1 '14 at 16:07
  • @Arsenius check out this answer: bitcoin.stackexchange.com/a/24887/11221 – George Kimionis May 1 '14 at 17:00

Your Answer

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

Browse other questions tagged or ask your own question.