<blockquote>
<p><strong>Transaction orphaned, missing reference</strong></p>
</blockquote>
<p>I suspect your <code>prev_hash</code> is wrong, maybe you used the wrong endianness?</p>
<p>Related: <a href="https://github.com/bitcoinjs/bitcoinjs-lib/issues/1332" rel="nofollow noreferrer">https://github.com/bitcoinjs/bitcoinjs-lib/issues/1332</a></p>
<hr />
<p><sup>Update after further information:</sup></p>
<blockquote>
<p><strong>i build the transaction on [...] bc-2.jp/tools/txeditor2.html</strong></p>
</blockquote>
<p>I suggest checking the items I have marked with arrows</p>
<p><a href="https://i.sstatic.net/UqEIZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UqEIZ.png" alt="web page with input fields for building a Bitcoin tx" /></a></p>

CC BY-SA 4.0
2024-03-15T14:29:31.313Z
i build the transaction on this site. @redgrittybrick

bc-2.jp/tools/txeditor2.html

the txid is 078ad0a16bc2eaf304ce27655a5d6a013b5243327fcb2b4791395b8b79076d8c
Tepan
CC BY-SA 4.0
2024-03-15T14:48:05.103Z
@Tepan: see updated answer.
RedGrittyBrick
CC BY-SA 4.0
2024-03-15T18:42:22.497Z
i make by hands using new unlocking script

Base58 address 2N7g6hoqwLo7KRgUNJTJFMXsx6jsJZk5D8C
Redeem Script Hex 51040928a14851
Redeem Script Asm OP_1 0928a148 OP_1
Redeem Script Hash Hex 9e4614600a7607b3f1de255dec5fd98bf62b822b
ScriptPubKey Hex a9149e4614600a7607b3f1de255dec5fd98bf62b822b87
ScriptPubKey Asm OP_HASH160 <9e4614600a7607b3f1de255dec5fd98bf62b822b> OP_EQUAL
Tepan
CC BY-SA 4.0
2024-03-15T18:43:48.500Z
010000000158c8ec75419da95ffb2b72ebb57c814b3ab2575d95db3541c9a7fcf8207b86b6000000000751040928a14851ffffffff01d0010100000000001976a9146a231411dfa9f88dd3f0e3e2ee3d68ef90c3930a88ac00000000

still same..

Error validating transaction: Transaction 87a9646b64b384d7fb2ec7ea842796f2ddb59ccc064b8946f273639f5f890287 orphaned, missing reference b6867b20f8fca7c94135db955d57b23a4b817cb5eb722bfb5fa99d4175ecc858.

can you help me to spend that fund (tesnet TBTC) ?
Tepan
CC BY-SA 4.0
2024-03-15T11:30:03.220Z
2024-03-15T16:01:13.430Z
2024-03-15T16:01:13.430Z
RedGrittyBrick
<p><strong>RAWTRANSACTION HEX</strong></p>
<blockquote>
<p>02000000000101ccfa268b70e83439c7d7e0cedf5c17b0446ec514e4e890af468cbf0179b278b200000000220020df63ee1a6210873eeb7d10e286a0fad13a7982fe685d35fa0c2d5a915f4a52f9ffffffff01606d0000000000001976a9146a231411dfa9f88dd3f0e3e2ee3d68ef90c3930a88ac011b0a28c30fb9118ed1da72e70ac4f89c0164756e8a021d517577768800000000</p>
</blockquote>
<p><strong>DECODE.</strong></p>
<pre><code>Decoded Transaction
{
    &quot;addresses&quot;: [
        &quot;2NFS3VQLTMALkZzDh1zP7X4XF1K5mfjMJ6F&quot;,
        &quot;mqC9wgGY254enSQKhDbtdtuGWLXKfHWBQQ&quot;
    ],
    &quot;block_height&quot;: -1,
    &quot;block_index&quot;: -1,
    &quot;confirmations&quot;: 0,
    &quot;double_spend&quot;: false,
    &quot;fees&quot;: 1000,
    &quot;hash&quot;: &quot;b8a8af826dd000035ab4387b4e9f8351a3e2f2b2115a048ac86866a1302a6530&quot;,
    &quot;inputs&quot;: [
        {
            &quot;addresses&quot;: [
                &quot;2NFS3VQLTMALkZzDh1zP7X4XF1K5mfjMJ6F&quot;
            ],
            &quot;age&quot;: 2582025,
            &quot;output_index&quot;: 0,
            &quot;output_value&quot;: 29000,
            &quot;prev_hash&quot;: &quot;b278b27901bf8c46af90e8e414c56e44b0175cdfcee0d7c73934e8708b26facc&quot;,
            &quot;script&quot;: &quot;0020df63ee1a6210873eeb7d10e286a0fad13a7982fe685d35fa0c2d5a915f4a52f9&quot;,
            &quot;script_type&quot;: &quot;pay-to-script-hash&quot;,
            &quot;sequence&quot;: 4294967295
        }
    ],
    &quot;outputs&quot;: [
        {
            &quot;addresses&quot;: [
                &quot;mqC9wgGY254enSQKhDbtdtuGWLXKfHWBQQ&quot;
            ],
            &quot;script&quot;: &quot;76a9146a231411dfa9f88dd3f0e3e2ee3d68ef90c3930a88ac&quot;,
            &quot;script_type&quot;: &quot;pay-to-pubkey-hash&quot;,
            &quot;value&quot;: 28000
        }
    ],
    &quot;preference&quot;: &quot;low&quot;,
    &quot;received&quot;: &quot;2024-03-15T05:08:37.0168363Z&quot;,
    &quot;relayed_by&quot;: &quot;3.238.117.234&quot;,
    &quot;size&quot;: 150,
    &quot;total&quot;: 28000,
    &quot;ver&quot;: 2,
    &quot;vin_sz&quot;: 1,
    &quot;vout_sz&quot;: 1,
    &quot;vsize&quot;: 127
}
</code></pre>
<p>unlocking script is 0a28c30fb9118ed1da72e70ac4f89c0164756e8a021d5175777688</p>
<p>witness
0020df63ee1a6210873eeb7d10e286a0fad13a7982fe685d35fa0c2d5a915f4a52f9</p>
<p>can someone please help me to fix this ?</p>

<transactions><raw-transaction><p2sh><non-standard-transaction><p2sh-p2wpkh>
Error validating transaction: Transaction orphaned, missing reference (TESTNET)
Tepan
# Error validating transaction: Transaction orphaned, missing reference (TESTNET)

(Asked by: username_0 on 2024-03-15)

RAWTRANSACTION HEX

02000000000101ccfa268b70e83439c7d7e0cedf5c17b0446ec514e4e890af468cbf0179b278b200000000220020df63ee1a6210873eeb7d10e286a0fad13a7982fe685d35fa0c2d5a915f4a52f9ffffffff01606d0000000000001976a9146a231411dfa9f88dd3f0e3e2ee3d68ef90c3930a88ac011b0a28c30fb9118ed1da72e70ac4f89c0164756e8a021d517577768800000000

DECODE.
Decoded Transaction
{
    "addresses": [
        "2NFS3VQLTMALkZzDh1zP7X4XF1K5mfjMJ6F",
        "mqC9wgGY254enSQKhDbtdtuGWLXKfHWBQQ"
    ],
    "block_height": -1,
    "block_index": -1,
    "confirmations": 0,
    "double_spend": false,
    "fees": 1000,
    "hash": "b8a8af826dd000035ab4387b4e9f8351a3e2f2b2115a048ac86866a1302a6530",
    "inputs": [
        {
            "addresses": [
                "2NFS3VQLTMALkZzDh1zP7X4XF1K5mfjMJ6F"
            ],
            "age": 2582025,
            "output_index": 0,
            "output_value": 29000,
            "prev_hash": "b278b27901bf8c46af90e8e414c56e44b0175cdfcee0d7c73934e8708b26facc",
            "script": "0020df63ee1a6210873eeb7d10e286a0fad13a7982fe685d35fa0c2d5a915f4a52f9",
            "script_type": "pay-to-script-hash",
            "sequence": 4294967295
        }
    ],
    "outputs": [
        {
            "addresses": [
                "mqC9wgGY254enSQKhDbtdtuGWLXKfHWBQQ"
            ],
            "script": "76a9146a231411dfa9f88dd3f0e3e2ee3d68ef90c3930a88ac",
            "script_type": "pay-to-pubkey-hash",
            "value": 28000
        }
    ],
    "preference": "low",
    "received": "2024-03-15T05:08:37.0168363Z",
    "relayed_by": "3.238.117.234",
    "size": 150,
    "total": 28000,
    "ver": 2,
    "vin_sz": 1,
    "vout_sz": 1,
    "vsize": 127
}

unlocking script is 0a28c30fb9118ed1da72e70ac4f89c0164756e8a021d5175777688
witness
0020df63ee1a6210873eeb7d10e286a0fad13a7982fe685d35fa0c2d5a915f4a52f9
can someone please help me to fix this ?

**Tags:** transactions, raw-transaction, p2sh, non-standard-transaction, p2sh-p2wpkh


---

## 1 answers

### Answer by username_1 on 2024-03-15. Score: 0

> **Transaction orphaned, missing reference**

I suspect your `prev_hash` is wrong, maybe you used the wrong endianness?

Related: <https://github.com/bitcoinjs/bitcoinjs-lib/issues/1332>

---

Update after further information:

> **i build the transaction on [...] bc-2.jp/tools/txeditor2.html**

I suggest checking the items I have marked with arrows

[![web page with input fields for building a Bitcoin tx](https://i.sstatic.net/UqEIZ.png)](https://i.sstatic.net/UqEIZ.png)

> **Comments:**
> **username_0**: i build the transaction on this site. @redgrittybrick  bc-2.jp/tools/txeditor2.html  the txid is 078ad0a16bc2eaf304ce27655a5d6a013b5243327fcb2b4791395b8b79076d8c  
> **username_1**: @username_0: see updated answer.  
> **username_0**: i make by hands using new unlocking script  Base58 address 2N7g6hoqwLo7KRgUNJTJFMXsx6jsJZk5D8C Redeem Script Hex 51040928a14851 Redeem Script Asm OP_1 0928a148 OP_1 Redeem Script Hash Hex 9e4614600a7607b3f1de255dec5fd98bf62b822b ScriptPubKey Hex a9149e4614600a7607b3f1de255dec5fd98bf62b822b87 ScriptPubKey Asm OP_HASH160 <9e4614600a7607b3f1de255dec5fd98bf62b822b> OP_EQUAL  
> **username_0**: 010000000158c8ec75419da95ffb2b72ebb57c814b3ab2575d95db3541c9a7fcf8207b86b6000000000751040928a14851ffffffff01d0010100000000001976a9146a231411dfa9f88dd3f0e3e2ee3d68ef90c3930a88ac00000000  still same..  Error validating transaction: Transaction 87a9646b64b384d7fb2ec7ea842796f2ddb59ccc064b8946f273639f5f890287 orphaned, missing reference b6867b20f8fca7c94135db955d57b23a4b817cb5eb722bfb5fa99d4175ecc858.  can you help me to spend that fund (tesnet TBTC) ?  

---

