consenlabs / token-core-ios

a blockchain private key management library on iOS
Apache License 2.0
879 stars 229 forks source link

调用BTCSignTransaction成功 但广播失败 #83

Open caiyanzhong opened 5 years ago

caiyanzhong commented 5 years ago

签名返回:010000000129577ad4b9d66c95c420b79756cf03cebac2b8b28835892729a684fb837cd55c010000006b483045022100f8e4eb2fb1d9e7a9f1af10cb29ce72a8d58451aef1a8653cbea01557c4a7804702202f07c7e63e15669fe736aff3c7441eb761de052be3433deeec14034d1810826a0121036fd10ddf1c123369c9928e584dfa64e67a2b41434d63e6dd034328e2c7817987ffffffff0240420f00000000001976a914a1806613a51a81966779e2fa1537013cf4cd2b1788ac10af1300000000001976a9144568c9e80544950c69198f60c8a3191a8e4f519188ac00000000

Decoded Transaction: { "addresses": [ "mmqxT8snJh2drfrz9EE4uGbC6vxYndeBHd", "mshNsDFQzRy4jsVJamh8hHLkkmvXC6r5sX", "mvEtuEqYPMrLaKjJ5nTZ57vQAoYUtVmMaQ" ], "block_height": -1, "block_index": -1, "confirmations": 0, "double_spend": false, "fees": 10000, "hash": "9b3a88aa3d580acb13c415b7369124a1ad660e344694bf0608519100285eb0b3", "inputs": [ { "addresses": [ "mshNsDFQzRy4jsVJamh8hHLkkmvXC6r5sX" ], "age": 1574012, "output_index": 1, "output_value": 2300000, "prev_hash": "5cd57c83fb84a62927893588b2b8c2bace03cf5697b720c4956cd6b9d47a5729", "script": "483045022100f8e4eb2fb1d9e7a9f1af10cb29ce72a8d58451aef1a8653cbea01557c4a7804702202f07c7e63e15669fe736aff3c7441eb761de052be3433deeec14034d1810826a0121036fd10ddf1c123369c9928e584dfa64e67a2b41434d63e6dd034328e2c7817987", "script_type": "pay-to-pubkey-hash", "sequence": 4294967295 } ], "outputs": [ { "addresses": [ "mvEtuEqYPMrLaKjJ5nTZ57vQAoYUtVmMaQ" ], "script": "76a914a1806613a51a81966779e2fa1537013cf4cd2b1788ac", "script_type": "pay-to-pubkey-hash", "value": 1000000 }, { "addresses": [ "mmqxT8snJh2drfrz9EE4uGbC6vxYndeBHd" ], "script": "76a9144568c9e80544950c69198f60c8a3191a8e4f519188ac", "script_type": "pay-to-pubkey-hash", "value": 1290000 } ], "preference": "medium", "received": "2019-08-13T09:32:49.50130043Z", "relayed_by": "34.230.28.252", "size": 226, "total": 2290000, "ver": 1, "vin_sz": 1, "vout_sz": 2 }

发送签名返回错误:Error validating transaction: Error running script for input 0 referencing 5cd57c83fb84a62927893588b2b8c2bace03cf5697b720c4956cd6b9d47a5729 at 1: Script was NOT verified successfully..

caiyanzhong commented 5 years ago

utxo: { address = 2Mth7K8iUNGJr298iCXWvcQaeeP13spJ3jB; amount = 2300000; scriptPubKey = 76a914859a2e31159724287ba62e7296b66446b02de29388ac; txHash = 5cd57c83fb84a62927893588b2b8c2bace03cf5697b720c4956cd6b9d47a5729; vout = 1; }

censhengde commented 4 years ago

老哥,UTXO参数怎获取的???教弟弟一手!!