使用Bitcoin.js进行交易会导致“脚本未验证”错误

时间:2019-01-17 12:06:03

标签: node.js bitcoin-testnet

使用bitcoinjs-lib进行比特币测试网交易。我能够成功生成交易的哈希,但是在检查过程中出现以下错误:

  

脚本未成功验证。.

有什么办法可以验证吗?

哈希:

0200000001120d3109f5465e29de173f144845c811261bdac177653b70a47e7cb883a28832010000006b483045022100a82a2069268dff2b76e13163f5cb73f062d7afa9c3f246d32c52280b8bfbdce3022077753e5b2e32835e983a3b56d77a341adf66dbdfe7174109608e53e98e62ea5801210212d52ea28aef968281e4ea669a5020bf3a1a0b11ef2b9209204992e5015b9417ffffffff02e8030000000000001976a914908d238fb958612be0d634060e8d8ef62f780c2188ac357dcb00000000001976a914db26599d6019a93656ff01f5359126ba23adc07888ac00000000

解码版本:

{
    "addresses": [
        "mthGgBTX1kxibjXwXxy5jraBNtTsajpqSx", 
        "n1ViDg2ExYS8HAhvZdn93UE5unRBiVNNiE"
    ], 
    "block_height": -1, 
    "block_index": -1, 
    "confirmations": 0, 
    "double_spend": false, 
    "fees": 0, 
    "hash": "927c5bff320b17d6825cd763266e9e26e88072804209324f8229769750ac2ac7", 
    "inputs": [
        {
            "age": 0, 
            "output_index": 1, 
            "prev_hash": "3288a283b87c7ea4703b6577c1da1b2611c84548143f17de295e46f509310d12", 
            "script": "483045022100a82a2069268dff2b76e13163f5cb73f062d7afa9c3f246d32c52280b8bfbdce3022077753e5b2e32835e983a3b56d77a341adf66dbdfe7174109608e53e98e62ea5801210212d52ea28aef968281e4ea669a5020bf3a1a0b11ef2b9209204992e5015b9417", 
            "script_type": "empty", 
            "sequence": 4294967295
        }
    ], 
    "outputs": [
        {
            "addresses": [
                "mthGgBTX1kxibjXwXxy5jraBNtTsajpqSx"
            ], 
            "script": "76a914908d238fb958612be0d634060e8d8ef62f780c2188ac", 
            "script_type": "pay-to-pubkey-hash", 
            "value": 1000
        }, 
        {
            "addresses": [
                "n1ViDg2ExYS8HAhvZdn93UE5unRBiVNNiE"
            ], 
            "script": "76a914db26599d6019a93656ff01f5359126ba23adc07888ac", 
            "script_type": "pay-to-pubkey-hash", 
            "value": 13335861
        }
    ], 
    "preference": "low", 
    "received": "2019-01-17T11:44:46.104823644Z", 
    "relayed_by": "3.84.36.119", 
    "size": 226, 
    "total": 13336861, 
    "ver": 2, 
    "vin_sz": 1, 
    "vout_sz": 2
}

尝试推送此哈希值将导致以下错误:

  

BitcoindException(super = com.neemre.btcdcli4j.core.BitcoindException:
  错误#-26:16:强制脚本验证标志失败
  (脚本无法执行OP_EQUALVERIFY操作),代码= -26)

0 个答案:

没有答案