<p>I have this raw transaction:</p>

<p>01000000024ae83382c185ba9a2fcaf0092bed4e8f74d31ca8eb234513c308b615fb9e3e3a000000006b48304502203ac946b370ecb43a32c3bf67598ca3ddc9818cb9efd0c6a6e68aca6e20d95b06022100841f3eed93cb955f9e1cbd26d23da3b80866872852ec5920d6ff794bd218bee40121035dea6c0ecb52807e2b7a9864c3212451e836eb0fd7cc6ba3369748825e2606f9ffffffffa3d6dc0d21402967de9431fde06d6b1cb458260d7852038035a79ec7554efcd9000000006b4830450220644bbf5a711243f679655e7ce7c193a8dde5fd110252dfdb4dd2d05d21e1b0a4022100a22c656b1e897bac71bf2d89e385eda4bdade16ca04957537fc73f903cb614d001210395676e88fe9ae950d40915df040a3610e1f42368f4a842692c24b29fd9d78a7bffffffff0330750000000000001976a9143fcf3750b81fad1cd27bae9c34feeefc278360ee88acbc0d0000000000001976a91483c1b13e99ccfc66405ef2ecb76deefca165097588ac204e0000000000001976a9147e69b1309dde4be2e39e1956ace0fa95db0d01b488ac00000000</p>

<p>It signed and ready to go</p>

<pre><code>{
    "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"
                ]
            }
        }
    ]
}
</code></pre>

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

<p>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...</p>

<p>Please advise how to fix it and make it works.</p>

<p><strong>Update:</strong> Wait a minute! I just found this post <a href="https://bitcoin.stackexchange.com/questions/14244/why-is-a-transaction-with-outputs-of-less-than-0-00005460-rejected?rq=1">Why is a transaction with outputs of less than ฿0.00005460 rejected?</a> ... It means if my change below then some "dust" value in BTC I can't send it???</p>

<p>But this is not dust. This is my change!</p>

<p>So how to keep my change less then 5460 satoshis? What is solution?</p>

CC BY-SA 3.0
2014-01-30T11:26:05.193Z
Looks like your tx is in blockchain now http://blockchain.info/tx/a4739fd533c2dd619954d76e9d9f0b159b1aa0827919b06208ef6d85d6e48fc2
Zergatul
CC BY-SA 3.0
2014-02-01T09:05:03.417Z
Yes but output values is different if you noticed.
Arsenius
CC BY-SA 3.0
2014-05-01T16:07:13.510Z
@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
CC BY-SA 3.0
2014-10-01T06:40:22.960Z
@GeorgeKimionis  thanks, I got it. But what if I don't have anymore unspent output? And dust is my last balance, what to do in this case?
Arsenius
<bitcoind><raw-transaction><error><dust>
Can't send raw transaction. Bitcoind error: {"code":-22,"message":"TX rejected"}
Arsenius
# Can't send raw transaction. Bitcoind error: {"code":-22,"message":"TX rejected"}

(Asked by: username_0 on 2014-01-30)

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?

**Tags:** bitcoind, raw-transaction, error, dust

> **Comments:**
> **username_1**: Looks like your tx is in blockchain now http://blockchain.info/tx/a4739fd533c2dd619954d76e9d9f0b159b1aa0827919b06208ef6d85d6e48fc2  
> **username_0**: Yes but output values is different if you noticed.  
> **username_0**: @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?  
> **username_0**: @GeorgeKimionis  thanks, I got it. But what if I don't have anymore unspent output? And dust is my last balance, what to do in this case?  

---

## 0 answers

