Bitcoin-Core
萊特幣 - 相同的交易雜湊和區塊雜湊
在 Ubuntu 16.04 上建構 litecoin v0.15.1rc1 客戶端后,我想建構一個使用 Litecoin 的應用程序。但我偶然發現了一些奇怪的東西(至少對我來說)。
我做了以下命令:
./litecoin-cli getrawtransaction 716aba3806b7737f5152af0079c73d20b924a4c1b679026feac42205e06d9f5b 1
我看到交易雜湊和區塊雜湊是完全一樣的。有人可以解釋一下嗎?如果需要,我可以粘貼整個輸出。
先感謝您!
編輯:此交易是測試網交易
完整輸出:
{ "txid": "716aba3806b7737f5152af0079c73d20b924a4c1b679026feac42205e06d9f5b", "hash": "716aba3806b7737f5152af0079c73d20b924a4c1b679026feac42205e06d9f5b", "version": 2, "size": 667, "vsize": 667, "locktime": 482836, "vin": [ { "txid": "c7fdc7179381c001b056e2f905c5b506c79d10ae9fc3cd2a7721467a4bf05906", "vout": 1, "scriptSig": { "asm": "3045022100d723c11024ec3800aa87f9e20ebbd344ebcb57db5f71b2cc66155a2ea3ac167f022019f1455f1438d44e048ecf3895a5e3d041b2aca1146fc18b9c8dc4e77e40bb50[ALL] 035e23a55d8804ae49e49136a2412fb53b02f3de495622ef1e6a40f63f1ea93e44", "hex": "483045022100d723c11024ec3800aa87f9e20ebbd344ebcb57db5f71b2cc66155a2ea3ac167f022019f1455f1438d44e048ecf3895a5e3d041b2aca1146fc18b9c8dc4e77e40bb500121035e23a55d8804ae49e49136a2412fb53b02f3de495622ef1e6a40f63f1ea93e44" }, "sequence": 4294967294 }, { "txid": "102313318e90c4c4ccb7581c90c1a8d38085106f19917544a21359067a80096a", "vout": 1, "scriptSig": { "asm": "30440220269bf280fd82163658da1be2f5301f851f13978937ee2c7701f654ac49ffc03602204fafb6592af7bdbedede204bd476b24fb03b50cdd75c5fbdb35e57692e870635[ALL] 0258c857eff89b9b54ccab29d4fcbadcb01c0a4cf9627fa56e4d6b96ae74f5e462", "hex": "4730440220269bf280fd82163658da1be2f5301f851f13978937ee2c7701f654ac49ffc03602204fafb6592af7bdbedede204bd476b24fb03b50cdd75c5fbdb35e57692e87063501210258c857eff89b9b54ccab29d4fcbadcb01c0a4cf9627fa56e4d6b96ae74f5e462" }, "sequence": 4294967294 }, { "txid": "7c7c64412dfaad8bf74280748f295ae8b4fa88b469e2473b08c98198c1ba9266", "vout": 0, "scriptSig": { "asm": "3044022039293b68bda763f2f07ead2edd257eee35078ece91e0afdeb56b898c5e89d44502205f49dbebb0521e1cf4d74a1ec0fec0d174352e47385f773c4323e0533453e566[ALL] 035e23a55d8804ae49e49136a2412fb53b02f3de495622ef1e6a40f63f1ea93e44", "hex": "473044022039293b68bda763f2f07ead2edd257eee35078ece91e0afdeb56b898c5e89d44502205f49dbebb0521e1cf4d74a1ec0fec0d174352e47385f773c4323e0533453e5660121035e23a55d8804ae49e49136a2412fb53b02f3de495622ef1e6a40f63f1ea93e44" }, "sequence": 4294967294 }, { "txid": "7c7c64412dfaad8bf74280748f295ae8b4fa88b469e2473b08c98198c1ba9266", "vout": 1, "scriptSig": { "asm": "304402200563b82f8d85ebc37f0adc106595caff6a69e5fecfda67c3003523fc195dd2a4022023f18ab2027f39b8c1e6be8cdf57d5fb6aae56c71756db4db9f123d6e88b77d3[ALL] 0209fac8d3f346aef9bf636e3d539e9c2cb0eb59bcd2898d560f0bbc9405628067", "hex": "47304402200563b82f8d85ebc37f0adc106595caff6a69e5fecfda67c3003523fc195dd2a4022023f18ab2027f39b8c1e6be8cdf57d5fb6aae56c71756db4db9f123d6e88b77d301210209fac8d3f346aef9bf636e3d539e9c2cb0eb59bcd2898d560f0bbc9405628067" }, "sequence": 4294967294 } ], "vout": [ { "value": 0.01885081, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 6e3201e86a59653a0ea031af8f2b03615748d248 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a9146e3201e86a59653a0ea031af8f2b03615748d24888ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "mqZcXjXjHBTHJwSxns2ZajLHpu3Ej33gh3" ] } }, { "value": 0.10000000, "n": 1, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 b3ebe3b4f7f100e00a1abfbb4ae39af4aece27f3 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914b3ebe3b4f7f100e00a1abfbb4ae39af4aece27f388ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "mwvHqHCSHqrfp7t7bnFA74JdnmaFAVXpLk" ] } } ], "hex": "02000000040659f04b7a4621772acdc39fae109dc706b5c505f9e256b001c0819317c7fdc7010000006b483045022100d723c11024ec3800aa87f9e20ebbd344ebcb57db5f71b2cc66155a2ea3ac167f022019f1455f1438d44e048ecf3895a5e3d041b2aca1146fc18b9c8dc4e77e40bb500121035e23a55d8804ae49e49136a2412fb53b02f3de495622ef1e6a40f63f1ea93e44feffffff6a09807a065913a2447591196f108580d3a8c1901c58b7ccc4c4908e31132310010000006a4730440220269bf280fd82163658da1be2f5301f851f13978937ee2c7701f654ac49ffc03602204fafb6592af7bdbedede204bd476b24fb03b50cdd75c5fbdb35e57692e87063501210258c857eff89b9b54ccab29d4fcbadcb01c0a4cf9627fa56e4d6b96ae74f5e462feffffff6692bac19881c9083b47e269b488fab4e85a298f748042f78badfa2d41647c7c000000006a473044022039293b68bda763f2f07ead2edd257eee35078ece91e0afdeb56b898c5e89d44502205f49dbebb0521e1cf4d74a1ec0fec0d174352e47385f773c4323e0533453e5660121035e23a55d8804ae49e49136a2412fb53b02f3de495622ef1e6a40f63f1ea93e44feffffff6692bac19881c9083b47e269b488fab4e85a298f748042f78badfa2d41647c7c010000006a47304402200563b82f8d85ebc37f0adc106595caff6a69e5fecfda67c3003523fc195dd2a4022023f18ab2027f39b8c1e6be8cdf57d5fb6aae56c71756db4db9f123d6e88b77d301210209fac8d3f346aef9bf636e3d539e9c2cb0eb59bcd2898d560f0bbc9405628067feffffff0299c31c00000000001976a9146e3201e86a59653a0ea031af8f2b03615748d24888ac80969800000000001976a914b3ebe3b4f7f100e00a1abfbb4ae39af4aece27f388ac145e0700", "blockhash": "bb55f8d0463ddf6b1c854286a2f1911ab590ed154ef502406f28fd0a01e52238", "confirmations": 6, "time": 1523009113, "blocktime": 1523009113 }
txid 和 blockhash 明顯不同。看來您混淆了該
hash
欄位的blockchash
欄位。該hash
欄位仍然只是交易的雜湊,而不是包含交易的塊的雜湊。由於此交易不是隔離見證交易,因此hash
和txid
將是相同的。如果此交易是隔離見證(即包含隔離見證輸入),則將hash
不同於txid
.