Transactions

OP_CHECKLOCKTIMEVERIFY 生成非標準事務

  • May 6, 2020

我在我的 regtest 環境中創建了一個事務,OP_CHECKLOCKTIMEVERIFY 它是我的事務數據:

0200000001b949410322a4af7c5b24d367aad9ac186902d4aa15b79ced3f821ae772aaabf70000000085483045022100ded7ee34b12e829a0957a852049546ff909d33129c8c1d3769db227cafffcbdd022033b1e9ed37682470b77450d791c8b5dde67f4de2d14b772d2bbcfbe22b3a453b012103f99b855c961eb142cc237d37db22ae67b4a80f2d2f178762110087c1e54f90c51976a914d1d03865cf22d10d9d1ed68889be6bc99513cd6d88ACfeffffff016036f829010000001E04ACFCD95EB175a9141a759e10e92cd4d855ba8bee9cd4f4a276033d1087ACFCD95E
{
 "txid": "55bfb3b57ad2fe3d3c70d5696e3a7cd0fd4e25c8bf41d7bfa3ab57a457b31776",
 "hash": "55bfb3b57ad2fe3d3c70d5696e3a7cd0fd4e25c8bf41d7bfa3ab57a457b31776",
 "version": 2,
 "size": 223,
 "vsize": 223,
 "weight": 892,
 "locktime": 1591344300,
 "vin": [
   {
     "txid": "f7abaa72e71a823fed9cb715aad4026918acd9aa67d3245b7cafa422034149b9",
     "vout": 0,
     "scriptSig": {
       "asm": "3045022100ded7ee34b12e829a0957a852049546ff909d33129c8c1d3769db227cafffcbdd022033b1e9ed37682470b77450d791c8b5dde67f4de2d14b772d2bbcfbe22b3a453b[ALL] 03f99b855c961eb142cc237d37db22ae67b4a80f2d2f178762110087c1e54f90c5 76a914d1d03865cf22d10d9d1ed68889be6bc99513cd6d88ac",
       "hex": "483045022100ded7ee34b12e829a0957a852049546ff909d33129c8c1d3769db227cafffcbdd022033b1e9ed37682470b77450d791c8b5dde67f4de2d14b772d2bbcfbe22b3a453b012103f99b855c961eb142cc237d37db22ae67b4a80f2d2f178762110087c1e54f90c51976a914d1d03865cf22d10d9d1ed68889be6bc99513cd6d88ac"
     },
     "sequence": 4294967294
   }
 ],
 "vout": [
   {
     "value": 49.991,
     "n": 0,
     "scriptPubKey": {
       "asm": "1591344300 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_HASH160 1a759e10e92cd4d855ba8bee9cd4f4a276033d10 OP_EQUAL",
       "hex": "04acfcd95eb175a9141a759e10e92cd4d855ba8bee9cd4f4a276033d1087",
       "type": "nonstandard"
     }
   }
 ]
}

如果我使用OP_CHECKLOCKTIMEVERIFY我得到一個非標準的交易是正常的嗎?如果我改變,我可以轉發它,acceptnonstdtxn=1但這不是我的目的。

您應該創建一個包含該腳本雜湊的 P2SH 地址,並且當您想要花費時,您可以從該 P2SH 地址花費。這將使您的交易標準。

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