Bitcoind

原始交易費用 - 256:高得離譜的錯誤

  • September 19, 2018

我分別執行以下程式碼。

bitcoin-cli -testnet createrawtransaction '''
[
   {
     "txid":"751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2",
     "vout" : 0
   }
]''' '{ "2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed": 0.001 }'

回复;

0200000001d2721359023b37b7f0b32c09ccc37621dae52031366604e01d628dcd61631b750000000000ffffffff02a08601000000000017a914657abfa90bd62f0f7a9533509b855cfd5f6e7d178750c300000000000017a91477c7f1a5a522daf70274dab6cdcb85efcc6e99318700000000

我的 DecodeRawTransaction 輸出;

array:8 [▼
     "txid" => "8608e07487a15b8866496bd5e90c92736d909a8b3023e1cfc75481e613164fe7"
     "hash" => "8608e07487a15b8866496bd5e90c92736d909a8b3023e1cfc75481e613164fe7"
     "version" => 2
     "size" => 83
     "vsize" => 83
     "locktime" => 0
     "vin" => array:1 [▼
          0 => array:4 [▼
               "txid" => "751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2"
               "vout" => 0
               "scriptSig" => array:2 [▼
                    "asm" => ""
                    "hex" => ""
               ]
               "sequence" => 4294967295
          ]
     ]
     "vout" => array:1 [▼
          0 => array:3 [▼
               "value" => 0.001
               "n" => 0
               "scriptPubKey" => array:5 [▼
                    "asm" => "OP_HASH160 657abfa90bd62f0f7a9533509b855cfd5f6e7d17 OP_EQUAL"
                    "hex" => "a914657abfa90bd62f0f7a9533509b855cfd5f6e7d1787"
                    "reqSigs" => 1
                    "type" => "scripthash"
                    "addresses" => array:1 [▼
                         0 => "2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed"
                    ]
               ]
          ]
     ]
]

之後,我正在執行這個命令;

signrawtransaction 0200000001d2721359023b37b7f0b32c09ccc37621dae52031366604e01d628dcd61631b750000000000ffffffff02a08601000000000017a914657abfa90bd62f0f7a9533509b855cfd5f6e7d178750c300000000000017a91477c7f1a5a522daf70274dab6cdcb85efcc6e99318700000000

最後,我正在執行 SendRawTransaction 命令。

bitcoin-cli -testnet sendrawtransaction 02000000000101d2721359023b37b7f0b32c09ccc37621dae52031366604e01d628dcd61631b75000000001716001466c18ec25251afe44f6a9f99be78b4e04857ef46ffffffff01a08601000000000017a914657abfa90bd62f0f7a9533509b855cfd5f6e7d178702483045022100b0291f0c753b3876a7d0d5c8970caa0e4b70cad224de9248377054e342ad1ed1022006de0d6e07991319ce467e5550bb203e4d398452c457b138e1fb5b7a3b2e9427012103f382a14da980fba9234d02599fe5ced7b1f907385d1d14bfb17017e5cfdc318500000000

我得到了這個錯誤;

256: absurdly-high-fee

誰能幫我?

費用是根據 vin 和 vout 之間的差額計算的。在這裡,您向地址發送了非常少的金額,但您沒有指定輸出來接收更改。客戶將此更改視為可能非常大的費用。

您需要創建一個單獨的 vout 以從交易中發送更改,並留下少量費用。

引用自:https://bitcoin.stackexchange.com/questions/79413