我正在使用laravel和Blockcypher进行比特币转移。并且在发送比特币时显示此错误。
该代码运行了一段时间,并开始引发错误。
$process = new Process($command, base_path('/btcutils/signer')); $process->run(); if (!$process->isSuccessful()) { throw new ProcessFailedException($process); } $signer = $process->getOutput(); if ($signer != '') { $rslt->signatures = [trim($signer)]; $rslt->pubkeys = [$publickey]; } $rsltJson = json_encode($rslt); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://api.blockcypher.com/v1/btc/test3/txs/send?token=xxxxxxxx"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $rsltJson); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $sendTransactionResponse = curl_exec($ch);
$ rsltJson的值为
{"tx":{"block_height":-1,"block_index":-1,"hash":"b466c94a62abdad289e55d5363852f9224241794dd5ed6d98cfb6512e6dc9df1","addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P","mkcMxuotBWnzys1hXLD6G31dFxhEKCwJsX"],"total":1973050,"fees":25800,"size":406,"preference":"high","relayed_by":"83.133.245.229","received":"2019-01-26T12:41:37.280321275Z","ver":1,"double_spend":false,"vin_sz":8,"vout_sz":2,"confirmations":0,"inputs":[{"prev_hash":"37aed50ff4f8f3922309c65e55bf9b0da9a9fced7415c23f9338d8cc11859247","output_index":0,"output_value":100,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453708},{"prev_hash":"9adc64b09c071b715755b29130fafd5643231867554a48a97cef4245cec6ba31","output_index":0,"output_value":100,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453712},{"prev_hash":"30d4ac616e573bc5d480f326bc00c0f0e86cf17ed81da602c83039f531c1be36","output_index":0,"output_value":100,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453712},{"prev_hash":"7e90af8dbd46844bd8326355bdb4c8a97141225baa204a8586fcea99ae6a4c0f","output_index":0,"output_value":100,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453713},{"prev_hash":"b5bca439c87eff606cfd734f568f7c24460868f8001a20cf8ce13fc571a68e47","output_index":0,"output_value":1200,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453816},{"prev_hash":"ece2312729d56e79f2af7426dd78a20ccf28b545d661d7b3e917fe688b14b31d","output_index":0,"output_value":1000,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453817},{"prev_hash":"3bcd7941a154aa19cefb693a66230183263988c2825de3790678c8098da9fb33","output_index":0,"output_value":1950,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453993},{"prev_hash":"af7e4122478bc02b3ad990385201b81f710213ee7b8af8030556afaf47b58944","output_index":1,"output_value":1994300,"sequence":4294967295,"addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash","age":1453997}],"outputs":[{"value":500,"script":"76a91437de77a8298232a29e47298ff290f1acafcddefe88ac","addresses":["mkcMxuotBWnzys1hXLD6G31dFxhEKCwJsX"],"script_type":"pay-to-pubkey-hash"},{"value":1972550,"script":"76a914bf5fb9ec963cd3ca80039c49cc6c394582442b3888ac","addresses":["mxxr2sV2Ct4dHpLJGUA19h9nUfq8wVpS9P"],"script_type":"pay-to-pubkey-hash"}]},"tosign":["3b674f7a60bf33c2dadfc60089ada41b6687e0fec4d6377561bb6f4cefd271a0","42b6f3a3406cbb0f825a0b9fbc21ede694f678a2afb50fbd837edd3193f4a778","20af8b4cae97c96a59cbc30562bee043a5615b24715319aa67497b1082c4a970","a71cff31a89444e53728cc470e5ea4a7077e52495def1ce300a57f8fbbc65b66","a285b7d77f86021614161eb80cefdde0e999f6afaf9447316e5dc9a671bcbc5c","1016245535929ef393fc0c2552a32772fad7964b9631ff405a83993ccc2ee6cb","98d48b41c9ac9bea80973f32c1855c65008bd37b1f672b435f4e014186f4f333","bce4cc6254f662300fcc17d78d5395a922837df6a9765f62972b4abbcadfcc4a"],"signatures":["3044022020a39e598f5cff32448342be0850b21bb693a455230cf030bbc3088531d88fbb022035e0a34d5492af06da414727bc76662dcc9b2fe5ec94a4a09c5bfb9d4a42abbf"],"pubkeys":["02731837097a7c6a61bf1176f867dabba6f6447cb0c50781a53b7b6f67abb1e817"]}