<p>I have a Bitcoin core 0.11.0.0 on a server and it always worked fine. However, when I try <code>sendtoaddress</code> now, it generates a TXID but the TXID is not recognized in Blockchain (it says "Sorry we could not find any blocks or transactions matching this hash") and the transaction is stuck forever on the transactions list, with a status of 0 confirmations. No error is showed. Also, I can receive bitcoin with no problem in that install.</p>

<p>Have them went to limbo? Is there a way to recover these btc? And how to make my btc core work again?</p>

<p>Here are my latest 2 transactions (that aren't recognized by Blockchain):</p>

<pre><code>{
    "amount" : -0.01000000,
    "fee" : -0.00034039,
    "confirmations" : 0,
    "txid" : "8307bac81b4eb857c16b1599436acc9d3f49e7d2253fc688cb9292fb47fe820d",
    "walletconflicts" : [
    ],
    "time" : 1485898700,
    "timereceived" : 1485898700,
    "details" : [
        {
            "account" : "",
            "address" : "1Gz8MxXiTgUo5Ycn7DgJziggkdGMZww191",
            "category" : "send",
            "amount" : -0.01000000,
            "vout" : 0,
            "fee" : -0.00034039
        }
    ],
    "hex" : "0100000002e1e327fea800282aa00921c43a26517acc64cb8c9c3261cb6dae7d0f668bf723000000006a47304402203d7af77e66f004f1a4cc83b8ac21ff6eabecbfe5e96905c0350d38a28cb8d5a802204101771b4a0350ccfe77b96f6b1b0e2f3ae1f620a521f38cb0fe1621cdbcce03012103a2e9b25ce7560da57259e076ad6101f4c7de67176cf29bbd7eed6a8117074e6bfeffffffbe1fe9973216a6e43cf1bdd4f7424d7e3e68620ad0889e693e1b92517616b14d010000006a4730440220627623dc6a66854b3ed71583d7a928c166bf3e9422bc7c25f15d4e43c156a7e9022024fca12c62c444d57004d8bbf1bf0960f3b64a90c9f62fa08ffb54c01920ee15012102cda9f734d610bd2c03b6c7ead5e493f8dd42bf310a13c34fd4dd57b4c6d5f042feffffff0240420f00000000001976a914af57bdd3af7711005e4b25ec58535c8693f6c63188acbfa20200000000001976a9146c15c3513c71e01d0b0d2a9b0c62fa038405fc3b88ac61e10600"
}



{
    "amount" : -0.05445000,
    "fee" : -0.00112313,
    "confirmations" : 0,
    "txid" : "4db1167651921b3e699e88d00a62683e7e4d42f7d4bdf13ce4a6163297e91fbe",
    "walletconflicts" : [
    ],
    "time" : 1485812669,
    "timereceived" : 1485812669,
    "details" : [
        {
            "account" : "",
            "address" : "1Jtw9hcx76C3CTwy5CoYETLu8eLSRbtFkT",
            "category" : "send",
            "amount" : -0.05445000,
            "vout" : 0,
            "fee" : -0.00112313
        }
    ],
    "hex" : "0100000007c5284391640ea0733c599a2c8c99389c7e00bef8bbd956b8cbbf907f19042f13000000006a473044022052d6e5682c47dc0872db24088e2829677cb60e9f5ac22d4db559e585b5a36060022037ae271d99b5667f9ba6e69db0f7632ecc5c6dc6581e161db258d89c96984301012103a7cca30a179d47b1056a378a82e0c9efb125139f0a1d3f8556a393d98bed27eafeffffff3c236945b01925e883cbcd0b212cc1c884cde4023a470a1a32e94bdd94ce8e9a000000006a47304402204a548e7d894aa48d2830c28ff47dbf25f63d868a7b9fd4e53d731ff1c9264d1202200da544ffbd0ba48631ce2c55abdcf76ff49ba28a44ffd59858bed6bfa911567d012103b1a903334b67e6c294ba03aeb415dc60fc6febfcc6770eb179c6e853d5937013feffffff1e5167deda344ecaf241049c2a4ba297c7105b4b4291b126c9564d7af2d71f5f000000006b483045022100d54fffb1cc35cbf198fd0847b7a30cd71d58815ad20bbb1436e4f82aea1d9897022076dc25e7cea43f985bae2c7c06c3616ed9a4d7d5f52030e1625964a8568cbeb5012103807e48bb9ff408e6ea92c3d2d0403d67d766696af258b551183bba2728eb995cfeffffff7a41d3b69ea4ed2dffe3ceccad9492832a80455c9004367dbd642c369e0aafc2000000006b483045022100e33e5b87640554350ca383aad327f38e5a3892e90165f60e96960216a2cfd7b1022041c8fe1e5f3c7cc4a099b2167d2e8854a6bb07a29d53baac613ac333b3ffe82d012103822cdda2be9a8b3a2bce5a7b3cf560ebb43989b32c0a8fa4b6d592aa9727bd9ffeffffff045b30cf4f348a9e758a481ff765c6175ab9406fb8c7b25810ed9979c6d0c660000000006b483045022100fdb2dc74573c58d6ff5bb4a9095e46524fc846797e37553b194df052f1588714022073ad03034f6ac806f765062e4a6942d9af1362322d9d24c201dfd2349348f15a012103df687d701e4ed1d5fe6e713407747f101df4bd921d98320013fad0be00623b17feffffff81349df39942b9cd41f72eafd89bfdc37fb76544c6b134e7880c124287a94ce7010000006a473044022006dad36e316bc1a08bc8ac3cbe93abd6cb2b804ab864adf351f0516713e11d0d02207658184768ee209f40a92c9f1bb7b59bfa2b63ddf268a2c5afd6ed6f50d51d60012102a5faeca03736ea8bf48dae4572f2b28cc2bb973c362605d9b285e7ac3e693e26feffffff7051a8e038a4a4f08da327b1dce671e55a67f99f5a6be8fd914f7a094c6163aa000000006a47304402201b057397f8ef1fcf7bd4f213672f855b1e7cabaa2f7e916c829fca3c92bffac0022039caa1a8b30693078c342a33747562e791646de09a45e9ebe143a17ebed9968f0121026ec8e0c398708d277007a3df35f7675d05f024ddfb224b44fee147b1566d7a71feffffff0288155300000000001976a914c44c8df549684f25467b9da3717c0aa5ac32abdf88accc420f00000000001976a914098e19275394d464a479cb8c22e92af8ff450e8c88ac98e00600"
}
</code></pre>

<p>They were all sent through <code>bitcoin-cli sendtoaddress</code>, which never gave me problems before. Also, this is not happening just to some transactions, but to all transactions that I do now using that installation.</p>

<p>Here is the transaction history from some transactions before this error appeared:</p>

<pre><code>{
        "account" : "",
        "address" : "1DzHVQEmwhJcPFZHa4mqmEtpYDeMivV9HQ",
        "category" : "send",
        "amount" : -0.00425424,
        "vout" : 0,
        "fee" : -0.00009600,
        "confirmations" : 96,
        "blockhash" : "0000000000000000009af402250b020f9bc0b52a8499b35794e3fdefc6427ce2",
        "blockindex" : 1816,
        "blocktime" : 1485846115,
        "txid" : "5f1fd7f27a4d56c926b191424b5b10c797a24b2a9c0441f2ca4e34dade67511e",
        "walletconflicts" : [
            "4248afebb80fb18d7a5624be00b015298b4ad0be629d11bb535c6f0904a83d52"
        ],
        "time" : 1485804855,
        "timereceived" : 1485804915
    },
    {
        "account" : "",
        "address" : "1Jtw9hcx76C3CTwy5CoYETLu8eLSRbtFkT",
        "category" : "send",
        "amount" : -0.00350608,
        "vout" : 1,
        "fee" : -0.00034416,
        "confirmations" : 143,
        "blockhash" : "000000000000000001ad830c8eff6baa49c44c8e4485ac5b180dda19e81f7885",
        "blockindex" : 1449,
        "blocktime" : 1485818240,
        "txid" : "9a8ece94dd4be9321a0a473a02e4cd84c8c12c210bcdcb83e82519b04569233c",
        "walletconflicts" : [
        ],
        "time" : 1485804916,
        "timereceived" : 1485804916
    },
    {
        "account" : "",
        "address" : "1Jtw9hcx76C3CTwy5CoYETLu8eLSRbtFkT",
        "category" : "send",
        "amount" : -0.05445000,
        "vout" : 0,
        "fee" : -0.00112313,
        "confirmations" : 0,
        "txid" : "4db1167651921b3e699e88d00a62683e7e4d42f7d4bdf13ce4a6163297e91fbe",
        "walletconflicts" : [
        ],
        "time" : 1485812669,
        "timereceived" : 1485812669
    },
    {
        "account" : "",
        "address" : "1FLGvKgjkS69h1KVUpwKXB3Mmii1S3jrtc",
        "category" : "receive",
        "amount" : 0.00206634,
        "vout" : 0,
        "confirmations" : 99,
        "blockhash" : "0000000000000000012b03745b24b041a3fce605153cdd7d049923416d844d46",
        "blockindex" : 1525,
        "blocktime" : 1485845061,
        "txid" : "23f78b660f7dae6dcb61329c8ccb64cc7a51263ac42109a02a2800a8fe27e3e1",
        "walletconflicts" : [
        ],
        "time" : 1485816901,
        "timereceived" : 1485816901
    },
    {
        "account" : "",
        "address" : "1Gz8MxXiTgUo5Ycn7DgJziggkdGMZww191",
        "category" : "send",
        "amount" : -0.01000000,
        "vout" : 0,
        "fee" : -0.00034039,
        "confirmations" : 0,
        "txid" : "8307bac81b4eb857c16b1599436acc9d3f49e7d2253fc688cb9292fb47fe820d",
        "walletconflicts" : [
        ],
        "time" : 1485898700,
        "timereceived" : 1485898700
    }
]
</code></pre>

<p><strong>Edit:</strong> I ran <code>bitcoind -zapwallettxes</code> and I have my funds back and I am able to send bitcoin again. But why did it happen and what can I do to prevent it from happening again? I mean, I'm running bitcoin core in a server for a site that I'm building, so it really can't happen when it's up.</p>

<p><strong>Edit 2:</strong> The problem happened again. I disabled the router's UPnP (afraid it had some problem with BTC Core running as a node and having 12 connections). I took a transaction I made that hasn't been recognized by Blockchain (.05 BTC, .001 as fee) and got its raw through <code>getrawwtransaction</code>, copied it to Blockchain's pushtx tool and this is what I got:</p>

<pre><code>An outpoint is already spent in [DBBitcoinTx{txIndex=217064367, ip=5.9.28.10, time=1486082953, size=223, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=1, nTxOutput=2}, DBBitcoinTx{txIndex=217073562, ip=82.134.66.146, time=1486085288, size=223, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=1, nTxOutput=2}, DBBitcoinTx{txIndex=217229864, ip=46.183.223.186, time=1486124142, size=519, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=3, nTxOutput=2}, DBBitcoinTx{txIndex=217230789, ip=5.189.176.14, time=1486123915, size=370, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=2, nTxOutput=2}] [OutpointImpl{txIndex=217057962, txOutputN=1}, OutpointImpl{txIndex=217227286, txOutputN=0}, OutpointImpl{txIndex=217227286, txOutputN=1}, OutpointImpl{txIndex=217066625, txOutputN=0}, OutpointImpl{txIndex=217066625, txOutputN=1}, OutpointImpl{txIndex=217420371, txOutputN=1}]
</code></pre>

<p>So are my transactions not being propagated properly? If so, how do I find out the reason and how to prevent it?</p>

<p><strong>Edit 3:</strong> I think I found the root of the problem.</p>

<p>I used decode-tx tool to decode the hex I got on  <code>getrawtransaction</code> and it showed:</p>

<pre><code>{
   "lock_time":451510,
   "size":1257,
   "inputs":[
      {
         "prev_out":{
            "index":1,
            "hash":"d134ef1458216fb826d3f1b474127946e1ca11f01a87fc422068917128d2141d"
         },
         "script":"47304402201d32169037ed4d027aa158b95a6168c9b24fb4652ab976a3d385a57bba34c53102206b80c850c8d67de47a058cb0c6d95ca00b72a0e18e4cc7177203d0be176661120121035d6dd7e514d0b9ca5dc90363982910f0602e72cd458ee3fff3b88d0742708909"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"3b76aaf5d8e8dd5cf93d81009c670fc2e98f2a8b60726027fa792e240f732534"
         },
         "script":"47304402202f0824ccbe197bcf3cdd454ae109aa7acd964e476fba9c09eff505dcd6087a3102202d541ee6650448343e094f545f22a328b52ff945a48131a3712025ad984e029a01210318bc5f03c55dc90016d355f0740042b0c5bd5c6d381ea03be0de25a619c26247"
      },
      {
         "prev_out":{
            "index":0,
            "hash":"bded0c615a5868535ba587a06769f680d7500dda842ff2f843d11627a6b90a52"
         },
         "script":"473044022039513d1e0b37505fecef6de2593ef87766bdab08178e5fcd227a6eae0e444fc102202adacee6ef7aa8c6c26a40e253e36296ff758c458a18355b5a0fe91be1d01d3c0121039ed4708293468074f437a8cb7574bb87efb4787c9cca68d44b257529b9ee5f7b"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"bded0c615a5868535ba587a06769f680d7500dda842ff2f843d11627a6b90a52"
         },
         "script":"483045022100ae06f71c73511992128a7ba2bc5f0f6b93091458910df5ae9c09e510485f5a34022042830e4f3f54d4163f3570d7422d60bb397eb2a74fb76423df5efbafd449b72b012102e0bec5b4f66054a707bf7af1d7f244be82d62ccd6574f736ff0c6e13bb5139b2"
      },
      {
         "prev_out":{
            "index":0,
            "hash":"1fa7e497f2cd31d4e9ff8ace167a8f3e458efe8a740736a3029c9a2772595258"
         },
         "script":"47304402200915d67fe78538661edaad9703d5e515a97ee4792377ea95657a95699d05296502207dc64db869c686081e6babec063907a7965f4d980abce7c11914d4486fce781b01210256248c0aabdf513a7a11729b65401bae90884a6830a266198b1bf6db7f2aea41"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"847901326c7300463266c25ceb3cb13d82a4d11027487f106be09dd72421727f"
         },
         "script":"483045022100d50660416846fe3ed5f327d90b7daa97397b509230d3ec6b264f9367e7c09f3c02206aed59b88f51c7deec5ec2d183d071a7c253894701aa03e4fd02ea2ec23a71bb01210208cabe6be609c05278ea26393841ae517bd8e4c575fb637a571ea94fffda15d9"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"a34ee9e1f370c128cbf4bf454b534e0f3dce05ccb39b069567ff5230ab9c1153"
         },
         "script":"483045022100cb906854c02938d78d930ec79403aa7cc1c81f8399091afb30f791207eddbc1602200f91e7d1a1942ff25cdad4e844c92bf574b02d4093960aa431adb63084a036a80121024830e992b2f652309d23d9a821755f69f3f27c670a53e8b35a32feb8cbda1a50"
      },
      {
         "prev_out":{
            "index":0,
            "hash":"8d2c13c9f17312d71c25119520ba74e5a3a03b9e6d7a651612be834135e2f224"
         },
         "script":"473044022065c557aa65825d6fe3feab9be00f3653f895eafcff2882f4a014715c46a5116d02202b1066e9c47eba2a6d951549ea09a4ed2b6d1fe03840e5cdbfcaee04b67d1c6f012103062530388cf0bf7d0a61ccd0bcb114d63970adf30b1c5b4be9272c89f503d292"
      }
   ],
   "version":1,
   "vin_sz":8,
   "hash":"25cb7cec2db1b4660bd8020614b88224e13fc805200e7eea624a3a91aa5869f6",
   "vout_sz":2,
   "out":[
      {
         "script_string":"OP_DUP OP_HASH160 af57bdd3af7711005e4b25ec58535c8693f6c631 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1Gz8MxXiTgUo5Ycn7DgJziggkdGMZww191",
         "value":5000000,
         "script":"76a914af57bdd3af7711005e4b25ec58535c8693f6c63188ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 7ff04e9b54b7028182c9ec930c2abe814850535c OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1CfUhBzdSWMB1tfghYyAKECfbCHTwAa5Xy",
         "value":1074498,
         "script":"76a9147ff04e9b54b7028182c9ec930c2abe814850535c88ac"
      }
   ]
}
</code></pre>

<p>Some of the inputs it shows are already spent:</p>

<ul>
<li><a href="https://blockchain.info/tx/a34ee9e1f370c128cbf4bf454b534e0f3dce05ccb39b069567ff5230ab9c1153" rel="nofollow noreferrer">https://blockchain.info/tx/a34ee9e1f370c128cbf4bf454b534e0f3dce05ccb39b069567ff5230ab9c1153</a>
<a href="https://blockchain.info/tx/d134ef1458216fb826d3f1b474127946e1ca11f01a87fc422068917128d2141d" rel="nofollow noreferrer">https://blockchain.info/tx/d134ef1458216fb826d3f1b474127946e1ca11f01a87fc422068917128d2141d</a>
<a href="https://blockchain.info/tx/8d2c13c9f17312d71c25119520ba74e5a3a03b9e6d7a651612be834135e2f224" rel="nofollow noreferrer">https://blockchain.info/tx/8d2c13c9f17312d71c25119520ba74e5a3a03b9e6d7a651612be834135e2f224</a>
(was this last one really spent?)</li>
</ul>

<p>So it looks like some outpoints were already spent and my wallet does not know it. How can I "tell" it that they were already spent (preferably without downloading the entire blockchain again, as it delays about 1 week)? <code>getwallettx</code>, <code>getwallettxes</code> and <code>rescan</code> didn't help. Also, when I run <code>-rescan</code>, the balance is about 0.06 BTC. When I run <code>-zapwallettx(es)</code>, the balance is about 0.1 BTC. Which one is true?</p>

CC BY-SA 3.0
2017-02-01T00:21:06.403Z
0.11 is 1.5 years old, and things change quickly in this space. Try upgrading to the latest version (0.13.2) first.
Pieter Wuille
CC BY-SA 3.0
2017-02-01T00:29:55.027Z
zapwallettxes simply made your client forget those transactions - they're not confirmed, your client just thinks you got your money back.
Pieter Wuille
CC BY-SA 3.0
2017-02-04T01:23:51.343Z
I recompiled BTC Core's latest version on the same machine (keeping wallet.dat) and tested again. Results in OP. Unfortunately no luck :(
Jefrey Sobreira Santos
CC BY-SA 3.0
2017-02-04T01:38:16.750Z
The 'An output is already spent' warning means that bc.i thinks you're creating a double spend. That's likely because it still known about the first transaction you sent, despite your wallet having forgotten about it because of the zap.
Pieter Wuille
CC BY-SA 3.0
2017-02-04T11:45:14.600Z
I think I found the root of the problem. OP edited. @PieterWuille I really had to doublespend a transaction some days ago (the btc core was set with low fees)...
Jefrey Sobreira Santos
CC BY-SA 3.0
2017-02-04T12:17:01.667Z
Blockchain.info has been not up to date a few times in the past months. Have you tried looking at your transactions on another blockexplorer? If your result for `-rescan` and `-zapwallettxes` differ, I'd say there are still unconfirmed transactions created by your wallet floating around.
Murch
CC BY-SA 3.0
2017-02-04T13:00:06.763Z
Hi, @Murch, thanks for your response! I've tried in multiple blockexplorers and all gave the same results (transaction not found). As an emergency act, if I just delete wallet.dat (and recover the funds later in another wallet), will bitcoin core work well again? Is this a safe way to completely reset ("factory reset") bitcoin core?
Jefrey Sobreira Santos
CC BY-SA 3.0
2017-02-04T14:02:55.073Z
The `wallet.dat` stores your private keys, which is what allows you to spend your money. The `wallet.dat` is the one thing that you should never delete or lose. – If your Bitcoin Core is synchronized, you should be able to see which transactions remain unconfirmed. Then, you either wait for them to confirm, or you replace them by a new transaction with a higher fee. This would of course lead to some transactions never confirming as only one from two conflicting versions of a transaction can confirm.
Murch
<wallet>
My transactions aren't being recognized in Blockchain
Jefrey Sobreira Santos
# My transactions aren't being recognized in Blockchain

(Asked by: username_0 on 2017-01-31)

I have a Bitcoin core 0.11.0.0 on a server and it always worked fine. However, when I try `sendtoaddress` now, it generates a TXID but the TXID is not recognized in Blockchain (it says "Sorry we could not find any blocks or transactions matching this hash") and the transaction is stuck forever on the transactions list, with a status of 0 confirmations. No error is showed. Also, I can receive bitcoin with no problem in that install.

Have them went to limbo? Is there a way to recover these btc? And how to make my btc core work again?

Here are my latest 2 transactions (that aren't recognized by Blockchain):

```
{
    "amount" : -0.01000000,
    "fee" : -0.00034039,
    "confirmations" : 0,
    "txid" : "8307bac81b4eb857c16b1599436acc9d3f49e7d2253fc688cb9292fb47fe820d",
    "walletconflicts" : [
    ],
    "time" : 1485898700,
    "timereceived" : 1485898700,
    "details" : [
        {
            "account" : "",
            "address" : "1Gz8MxXiTgUo5Ycn7DgJziggkdGMZww191",
            "category" : "send",
            "amount" : -0.01000000,
            "vout" : 0,
            "fee" : -0.00034039
        }
    ],
    "hex" : "0100000002e1e327fea800282aa00921c43a26517acc64cb8c9c3261cb6dae7d0f668bf723000000006a47304402203d7af77e66f004f1a4cc83b8ac21ff6eabecbfe5e96905c0350d38a28cb8d5a802204101771b4a0350ccfe77b96f6b1b0e2f3ae1f620a521f38cb0fe1621cdbcce03012103a2e9b25ce7560da57259e076ad6101f4c7de67176cf29bbd7eed6a8117074e6bfeffffffbe1fe9973216a6e43cf1bdd4f7424d7e3e68620ad0889e693e1b92517616b14d010000006a4730440220627623dc6a66854b3ed71583d7a928c166bf3e9422bc7c25f15d4e43c156a7e9022024fca12c62c444d57004d8bbf1bf0960f3b64a90c9f62fa08ffb54c01920ee15012102cda9f734d610bd2c03b6c7ead5e493f8dd42bf310a13c34fd4dd57b4c6d5f042feffffff0240420f00000000001976a914af57bdd3af7711005e4b25ec58535c8693f6c63188acbfa20200000000001976a9146c15c3513c71e01d0b0d2a9b0c62fa038405fc3b88ac61e10600"
}

{
    "amount" : -0.05445000,
    "fee" : -0.00112313,
    "confirmations" : 0,
    "txid" : "4db1167651921b3e699e88d00a62683e7e4d42f7d4bdf13ce4a6163297e91fbe",
    "walletconflicts" : [
    ],
    "time" : 1485812669,
    "timereceived" : 1485812669,
    "details" : [
        {
            "account" : "",
            "address" : "1Jtw9hcx76C3CTwy5CoYETLu8eLSRbtFkT",
            "category" : "send",
            "amount" : -0.05445000,
            "vout" : 0,
            "fee" : -0.00112313
        }
    ],
    "hex" : "0100000007c5284391640ea0733c599a2c8c99389c7e00bef8bbd956b8cbbf907f19042f13000000006a473044022052d6e5682c47dc0872db24088e2829677cb60e9f5ac22d4db559e585b5a36060022037ae271d99b5667f9ba6e69db0f7632ecc5c6dc6581e161db258d89c96984301012103a7cca30a179d47b1056a378a82e0c9efb125139f0a1d3f8556a393d98bed27eafeffffff3c236945b01925e883cbcd0b212cc1c884cde4023a470a1a32e94bdd94ce8e9a000000006a47304402204a548e7d894aa48d2830c28ff47dbf25f63d868a7b9fd4e53d731ff1c9264d1202200da544ffbd0ba48631ce2c55abdcf76ff49ba28a44ffd59858bed6bfa911567d012103b1a903334b67e6c294ba03aeb415dc60fc6febfcc6770eb179c6e853d5937013feffffff1e5167deda344ecaf241049c2a4ba297c7105b4b4291b126c9564d7af2d71f5f000000006b483045022100d54fffb1cc35cbf198fd0847b7a30cd71d58815ad20bbb1436e4f82aea1d9897022076dc25e7cea43f985bae2c7c06c3616ed9a4d7d5f52030e1625964a8568cbeb5012103807e48bb9ff408e6ea92c3d2d0403d67d766696af258b551183bba2728eb995cfeffffff7a41d3b69ea4ed2dffe3ceccad9492832a80455c9004367dbd642c369e0aafc2000000006b483045022100e33e5b87640554350ca383aad327f38e5a3892e90165f60e96960216a2cfd7b1022041c8fe1e5f3c7cc4a099b2167d2e8854a6bb07a29d53baac613ac333b3ffe82d012103822cdda2be9a8b3a2bce5a7b3cf560ebb43989b32c0a8fa4b6d592aa9727bd9ffeffffff045b30cf4f348a9e758a481ff765c6175ab9406fb8c7b25810ed9979c6d0c660000000006b483045022100fdb2dc74573c58d6ff5bb4a9095e46524fc846797e37553b194df052f1588714022073ad03034f6ac806f765062e4a6942d9af1362322d9d24c201dfd2349348f15a012103df687d701e4ed1d5fe6e713407747f101df4bd921d98320013fad0be00623b17feffffff81349df39942b9cd41f72eafd89bfdc37fb76544c6b134e7880c124287a94ce7010000006a473044022006dad36e316bc1a08bc8ac3cbe93abd6cb2b804ab864adf351f0516713e11d0d02207658184768ee209f40a92c9f1bb7b59bfa2b63ddf268a2c5afd6ed6f50d51d60012102a5faeca03736ea8bf48dae4572f2b28cc2bb973c362605d9b285e7ac3e693e26feffffff7051a8e038a4a4f08da327b1dce671e55a67f99f5a6be8fd914f7a094c6163aa000000006a47304402201b057397f8ef1fcf7bd4f213672f855b1e7cabaa2f7e916c829fca3c92bffac0022039caa1a8b30693078c342a33747562e791646de09a45e9ebe143a17ebed9968f0121026ec8e0c398708d277007a3df35f7675d05f024ddfb224b44fee147b1566d7a71feffffff0288155300000000001976a914c44c8df549684f25467b9da3717c0aa5ac32abdf88accc420f00000000001976a914098e19275394d464a479cb8c22e92af8ff450e8c88ac98e00600"
}

```

They were all sent through `bitcoin-cli sendtoaddress`, which never gave me problems before. Also, this is not happening just to some transactions, but to all transactions that I do now using that installation.

Here is the transaction history from some transactions before this error appeared:

```
{
        "account" : "",
        "address" : "1DzHVQEmwhJcPFZHa4mqmEtpYDeMivV9HQ",
        "category" : "send",
        "amount" : -0.00425424,
        "vout" : 0,
        "fee" : -0.00009600,
        "confirmations" : 96,
        "blockhash" : "0000000000000000009af402250b020f9bc0b52a8499b35794e3fdefc6427ce2",
        "blockindex" : 1816,
        "blocktime" : 1485846115,
        "txid" : "5f1fd7f27a4d56c926b191424b5b10c797a24b2a9c0441f2ca4e34dade67511e",
        "walletconflicts" : [
            "4248afebb80fb18d7a5624be00b015298b4ad0be629d11bb535c6f0904a83d52"
        ],
        "time" : 1485804855,
        "timereceived" : 1485804915
    },
    {
        "account" : "",
        "address" : "1Jtw9hcx76C3CTwy5CoYETLu8eLSRbtFkT",
        "category" : "send",
        "amount" : -0.00350608,
        "vout" : 1,
        "fee" : -0.00034416,
        "confirmations" : 143,
        "blockhash" : "000000000000000001ad830c8eff6baa49c44c8e4485ac5b180dda19e81f7885",
        "blockindex" : 1449,
        "blocktime" : 1485818240,
        "txid" : "9a8ece94dd4be9321a0a473a02e4cd84c8c12c210bcdcb83e82519b04569233c",
        "walletconflicts" : [
        ],
        "time" : 1485804916,
        "timereceived" : 1485804916
    },
    {
        "account" : "",
        "address" : "1Jtw9hcx76C3CTwy5CoYETLu8eLSRbtFkT",
        "category" : "send",
        "amount" : -0.05445000,
        "vout" : 0,
        "fee" : -0.00112313,
        "confirmations" : 0,
        "txid" : "4db1167651921b3e699e88d00a62683e7e4d42f7d4bdf13ce4a6163297e91fbe",
        "walletconflicts" : [
        ],
        "time" : 1485812669,
        "timereceived" : 1485812669
    },
    {
        "account" : "",
        "address" : "1FLGvKgjkS69h1KVUpwKXB3Mmii1S3jrtc",
        "category" : "receive",
        "amount" : 0.00206634,
        "vout" : 0,
        "confirmations" : 99,
        "blockhash" : "0000000000000000012b03745b24b041a3fce605153cdd7d049923416d844d46",
        "blockindex" : 1525,
        "blocktime" : 1485845061,
        "txid" : "23f78b660f7dae6dcb61329c8ccb64cc7a51263ac42109a02a2800a8fe27e3e1",
        "walletconflicts" : [
        ],
        "time" : 1485816901,
        "timereceived" : 1485816901
    },
    {
        "account" : "",
        "address" : "1Gz8MxXiTgUo5Ycn7DgJziggkdGMZww191",
        "category" : "send",
        "amount" : -0.01000000,
        "vout" : 0,
        "fee" : -0.00034039,
        "confirmations" : 0,
        "txid" : "8307bac81b4eb857c16b1599436acc9d3f49e7d2253fc688cb9292fb47fe820d",
        "walletconflicts" : [
        ],
        "time" : 1485898700,
        "timereceived" : 1485898700
    }
]

```

**Edit:** I ran `bitcoind -zapwallettxes` and I have my funds back and I am able to send bitcoin again. But why did it happen and what can I do to prevent it from happening again? I mean, I'm running bitcoin core in a server for a site that I'm building, so it really can't happen when it's up.

**Edit 2:** The problem happened again. I disabled the router's UPnP (afraid it had some problem with BTC Core running as a node and having 12 connections). I took a transaction I made that hasn't been recognized by Blockchain (.05 BTC, .001 as fee) and got its raw through `getrawwtransaction`, copied it to Blockchain's pushtx tool and this is what I got:

```
An outpoint is already spent in [DBBitcoinTx{txIndex=217064367, ip=5.9.28.10, time=1486082953, size=223, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=1, nTxOutput=2}, DBBitcoinTx{txIndex=217073562, ip=82.134.66.146, time=1486085288, size=223, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=1, nTxOutput=2}, DBBitcoinTx{txIndex=217229864, ip=46.183.223.186, time=1486124142, size=519, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=3, nTxOutput=2}, DBBitcoinTx{txIndex=217230789, ip=5.189.176.14, time=1486123915, size=370, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=2, nTxOutput=2}] [OutpointImpl{txIndex=217057962, txOutputN=1}, OutpointImpl{txIndex=217227286, txOutputN=0}, OutpointImpl{txIndex=217227286, txOutputN=1}, OutpointImpl{txIndex=217066625, txOutputN=0}, OutpointImpl{txIndex=217066625, txOutputN=1}, OutpointImpl{txIndex=217420371, txOutputN=1}]

```

So are my transactions not being propagated properly? If so, how do I find out the reason and how to prevent it?

**Edit 3:** I think I found the root of the problem.

I used decode-tx tool to decode the hex I got on `getrawtransaction` and it showed:

```
{
   "lock_time":451510,
   "size":1257,
   "inputs":[
      {
         "prev_out":{
            "index":1,
            "hash":"d134ef1458216fb826d3f1b474127946e1ca11f01a87fc422068917128d2141d"
         },
         "script":"47304402201d32169037ed4d027aa158b95a6168c9b24fb4652ab976a3d385a57bba34c53102206b80c850c8d67de47a058cb0c6d95ca00b72a0e18e4cc7177203d0be176661120121035d6dd7e514d0b9ca5dc90363982910f0602e72cd458ee3fff3b88d0742708909"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"3b76aaf5d8e8dd5cf93d81009c670fc2e98f2a8b60726027fa792e240f732534"
         },
         "script":"47304402202f0824ccbe197bcf3cdd454ae109aa7acd964e476fba9c09eff505dcd6087a3102202d541ee6650448343e094f545f22a328b52ff945a48131a3712025ad984e029a01210318bc5f03c55dc90016d355f0740042b0c5bd5c6d381ea03be0de25a619c26247"
      },
      {
         "prev_out":{
            "index":0,
            "hash":"bded0c615a5868535ba587a06769f680d7500dda842ff2f843d11627a6b90a52"
         },
         "script":"473044022039513d1e0b37505fecef6de2593ef87766bdab08178e5fcd227a6eae0e444fc102202adacee6ef7aa8c6c26a40e253e36296ff758c458a18355b5a0fe91be1d01d3c0121039ed4708293468074f437a8cb7574bb87efb4787c9cca68d44b257529b9ee5f7b"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"bded0c615a5868535ba587a06769f680d7500dda842ff2f843d11627a6b90a52"
         },
         "script":"483045022100ae06f71c73511992128a7ba2bc5f0f6b93091458910df5ae9c09e510485f5a34022042830e4f3f54d4163f3570d7422d60bb397eb2a74fb76423df5efbafd449b72b012102e0bec5b4f66054a707bf7af1d7f244be82d62ccd6574f736ff0c6e13bb5139b2"
      },
      {
         "prev_out":{
            "index":0,
            "hash":"1fa7e497f2cd31d4e9ff8ace167a8f3e458efe8a740736a3029c9a2772595258"
         },
         "script":"47304402200915d67fe78538661edaad9703d5e515a97ee4792377ea95657a95699d05296502207dc64db869c686081e6babec063907a7965f4d980abce7c11914d4486fce781b01210256248c0aabdf513a7a11729b65401bae90884a6830a266198b1bf6db7f2aea41"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"847901326c7300463266c25ceb3cb13d82a4d11027487f106be09dd72421727f"
         },
         "script":"483045022100d50660416846fe3ed5f327d90b7daa97397b509230d3ec6b264f9367e7c09f3c02206aed59b88f51c7deec5ec2d183d071a7c253894701aa03e4fd02ea2ec23a71bb01210208cabe6be609c05278ea26393841ae517bd8e4c575fb637a571ea94fffda15d9"
      },
      {
         "prev_out":{
            "index":1,
            "hash":"a34ee9e1f370c128cbf4bf454b534e0f3dce05ccb39b069567ff5230ab9c1153"
         },
         "script":"483045022100cb906854c02938d78d930ec79403aa7cc1c81f8399091afb30f791207eddbc1602200f91e7d1a1942ff25cdad4e844c92bf574b02d4093960aa431adb63084a036a80121024830e992b2f652309d23d9a821755f69f3f27c670a53e8b35a32feb8cbda1a50"
      },
      {
         "prev_out":{
            "index":0,
            "hash":"8d2c13c9f17312d71c25119520ba74e5a3a03b9e6d7a651612be834135e2f224"
         },
         "script":"473044022065c557aa65825d6fe3feab9be00f3653f895eafcff2882f4a014715c46a5116d02202b1066e9c47eba2a6d951549ea09a4ed2b6d1fe03840e5cdbfcaee04b67d1c6f012103062530388cf0bf7d0a61ccd0bcb114d63970adf30b1c5b4be9272c89f503d292"
      }
   ],
   "version":1,
   "vin_sz":8,
   "hash":"25cb7cec2db1b4660bd8020614b88224e13fc805200e7eea624a3a91aa5869f6",
   "vout_sz":2,
   "out":[
      {
         "script_string":"OP_DUP OP_HASH160 af57bdd3af7711005e4b25ec58535c8693f6c631 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1Gz8MxXiTgUo5Ycn7DgJziggkdGMZww191",
         "value":5000000,
         "script":"76a914af57bdd3af7711005e4b25ec58535c8693f6c63188ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 7ff04e9b54b7028182c9ec930c2abe814850535c OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1CfUhBzdSWMB1tfghYyAKECfbCHTwAa5Xy",
         "value":1074498,
         "script":"76a9147ff04e9b54b7028182c9ec930c2abe814850535c88ac"
      }
   ]
}

```

Some of the inputs it shows are already spent:

* <https://blockchain.info/tx/a34ee9e1f370c128cbf4bf454b534e0f3dce05ccb39b069567ff5230ab9c1153>
  <https://blockchain.info/tx/d134ef1458216fb826d3f1b474127946e1ca11f01a87fc422068917128d2141d>
  <https://blockchain.info/tx/8d2c13c9f17312d71c25119520ba74e5a3a03b9e6d7a651612be834135e2f224>
  (was this last one really spent?)

So it looks like some outpoints were already spent and my wallet does not know it. How can I "tell" it that they were already spent (preferably without downloading the entire blockchain again, as it delays about 1 week)? `getwallettx`, `getwallettxes` and `rescan` didn't help. Also, when I run `-rescan`, the balance is about 0.06 BTC. When I run `-zapwallettx(es)`, the balance is about 0.1 BTC. Which one is true?

**Tags:** wallet

> **Comments:**
> **username_1**: 0.11 is 1.5 years old, and things change quickly in this space. Try upgrading to the latest version (0.13.2) first.  
> **username_1**: zapwallettxes simply made your client forget those transactions - they're not confirmed, your client just thinks you got your money back.  
> **username_0**: I recompiled BTC Core's latest version on the same machine (keeping wallet.dat) and tested again. Results in OP. Unfortunately no luck :(  
> **username_1**: The 'An output is already spent' warning means that bc.i thinks you're creating a double spend. That's likely because it still known about the first transaction you sent, despite your wallet having forgotten about it because of the zap.  
> **username_0**: I think I found the root of the problem. OP edited. @username_1 I really had to doublespend a transaction some days ago (the btc core was set with low fees)...  
> **username_2**: Blockchain.info has been not up to date a few times in the past months. Have you tried looking at your transactions on another blockexplorer? If your result for `-rescan` and `-zapwallettxes` differ, I'd say there are still unconfirmed transactions created by your wallet floating around.  
> **username_0**: Hi, @username_2, thanks for your response! I've tried in multiple blockexplorers and all gave the same results (transaction not found). As an emergency act, if I just delete wallet.dat (and recover the funds later in another wallet), will bitcoin core work well again? Is this a safe way to completely reset ("factory reset") bitcoin core?  
> **username_2**: The `wallet.dat` stores your private keys, which is what allows you to spend your money. The `wallet.dat` is the one thing that you should never delete or lose. – If your Bitcoin Core is synchronized, you should be able to see which transactions remain unconfirmed. Then, you either wait for them to confirm, or you replace them by a new transaction with a higher fee. This would of course lead to some transactions never confirming as only one from two conflicting versions of a transaction can confirm.  

---

## 0 answers

