<p>I have fixed the issue by attaching input info while signing the transaction.</p>

<p><strong>createrawtransaction:</strong></p>

<pre><code>createrawtransaction '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '{"mtRWdkBpAyz8pUoCYobABvnEe1xFPqvkJN":0.36972432}'
</code></pre>

<p><strong>result:</strong> </p>

<pre><code>0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c0100000000ffffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000
</code></pre>

<p><strong>then signrawtransaction:</strong></p>

<pre><code>signrawtransaction '0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c0100000000ffffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000' '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '["cUhHXQLPaNSPNh2rRiWSarn5jEoJ26HvrAYjLCfxnDsAYZenTthe"]'
</code></pre>

<p><strong>result:</strong> </p>

<pre><code>{ "hex" : "0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c010000006a47304402200d3f8a6430f952199d7f4550328ae980f9926b13f7c78f8a5640ecd445aa20bf022074a7e1ec5d27d83da6bb19a8fe9ef9757e40fa86a9b1437c27031be015d82db40121032effa843ad1052540de3ae323a165101bc2e980c76b69bdc69444e3ef599054effffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000", "complete" : true }
</code></pre>

CC BY-SA 3.0
2018-02-20T01:23:46.593Z
2018-02-20T01:23:46.593Z
Tailer
<p>I've created raw transaction with non-spent inputs and already exist in Bitcoin cash abc 0.16.2, But when I try to sign that raw transaction I get <code>Input not found or already spent</code></p>

<p>RawTransaction </p>

<blockquote>
  <p>02000000012a6b8e40c82f2a428ea6fb1b355832fe01319235393a9ca2cbf5bfbe3a342e290000000000ffffffff0280969800000000001976a914fe7cba7f798d378abffa4d5620f80d22adfbe1b088ac20091409000000001976a9147aec53c51184a7cf5413a919674bf5efffc0ad6088ac00000000</p>
</blockquote>

<p>if you decode this transaction you see the input I used and it's "not already spent"</p>

<p>when I call <code>Bitcoin-cli listunspent</code> I see used input exist in the wallet.</p>

<pre><code>{
    "txid": "292e343abebff5cba29c3a3935923101fe3258351bfba68e422a2fc8408e6b2a",
    "vout": 0,
    "address": "n1V7R2SadYSRqBg3AzFxiokDRm8LG85tdX",
    "account": "",
    "scriptPubKey": "76a914db094c026ee745ed8c65af3a692411a9766022f288ac",
    "amount": 1.62500000,
    "confirmations": 6,
    "spendable": false,
    "solvable": false   },
</code></pre>

<p>When i follow the same steps to create/sign a transaction on Bitcoin core or litecoin it works. </p>

<p>I heard that I should add used inputs when calling <code>signrawtransaction</code></p>

<bitcoin-cash><spending><ecash>
Bitcoin cash signraw "Input not found or already spent"
Tailer
# Bitcoin cash signraw "Input not found or already spent"

(Asked by: username_0 on 2018-02-19)

I've created raw transaction with non-spent inputs and already exist in Bitcoin cash abc 0.16.2, But when I try to sign that raw transaction I get `Input not found or already spent`

RawTransaction

> 02000000012a6b8e40c82f2a428ea6fb1b355832fe01319235393a9ca2cbf5bfbe3a342e290000000000ffffffff0280969800000000001976a914fe7cba7f798d378abffa4d5620f80d22adfbe1b088ac20091409000000001976a9147aec53c51184a7cf5413a919674bf5efffc0ad6088ac00000000

if you decode this transaction you see the input I used and it's "not already spent"

when I call `Bitcoin-cli listunspent` I see used input exist in the wallet.

```
{
    "txid": "292e343abebff5cba29c3a3935923101fe3258351bfba68e422a2fc8408e6b2a",
    "vout": 0,
    "address": "n1V7R2SadYSRqBg3AzFxiokDRm8LG85tdX",
    "account": "",
    "scriptPubKey": "76a914db094c026ee745ed8c65af3a692411a9766022f288ac",
    "amount": 1.62500000,
    "confirmations": 6,
    "spendable": false,
    "solvable": false   },

```

When i follow the same steps to create/sign a transaction on Bitcoin core or litecoin it works.

I heard that I should add used inputs when calling `signrawtransaction`

**Tags:** bitcoin-cash, spending, ecash


---

## 1 answers

### Answer by username_0 on 2018-02-20. Score: 2 | Accepted answer

I have fixed the issue by attaching input info while signing the transaction.

**createrawtransaction:**

```
createrawtransaction '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '{"mtRWdkBpAyz8pUoCYobABvnEe1xFPqvkJN":0.36972432}'

```

**result:**

```
0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c0100000000ffffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000

```

**then signrawtransaction:**

```
signrawtransaction '0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c0100000000ffffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000' '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '["cUhHXQLPaNSPNh2rRiWSarn5jEoJ26HvrAYjLCfxnDsAYZenTthe"]'

```

**result:**

```
{ "hex" : "0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c010000006a47304402200d3f8a6430f952199d7f4550328ae980f9926b13f7c78f8a5640ecd445aa20bf022074a7e1ec5d27d83da6bb19a8fe9ef9757e40fa86a9b1437c27031be015d82db40121032effa843ad1052540de3ae323a165101bc2e980c76b69bdc69444e3ef599054effffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000", "complete" : true }

```


---

