比特币getblocktemplate响应json有变化吗?现在,coinbasetxn在哪里?

时间:2017-02-20 00:50:07

标签: rpc bitcoin coinbase-api

当为比特币rpc调用getblocktemplate时,返回的json(字典)响应似乎不再具有'coinbasetxn'键。现在,coinbase交易在哪里?

getblocktemplate()的示例回复:

  

{'height':453825,'mintime':1487548277,'version':536870912,   'coinbasevalue':1306788433,'previousblockhash':   '0000000000000000019ca63484f8251b15647869d4c36ec5b201277f3e2aa70b',   '规则':['csv'],'sigoplimit':20000,'weightlimit':4000000,   'mutable':['time','transactions','prevblock'],'target':   '0000000000000000027e93000000000000000000000000000000000000000000',   'bits':'18027e93','longpollid':   '0000000000000000019ca63484f8251b15647869d4c36ec5b201277f3e2aa70b20632',   'vbrequired':0,'noncerange':'00000000ffffffff','curtime':   1487550914,'coinbaseaux':{'flags':''},'transactions':[{'取决于':   [],'数据':   '0100000001fb5b6947704577fd09260adf7f80c92ada4776ca7674a5fb8af40df3c747293a010000006a473044022048aab0d8bd6c127696ce2cceb42693af2ae8eec561a33acf43577193070cd965022043667ae3c25661d251133b75fbefa8b9b5d3dddeedae028c90899c642f693479012103c7b4ed6b91df7eb7d2bd62a6257dd2e2fa79d07e81080b7e95bcd3d9e448f464feffffff02504b4500000000001976a914fd09ed8b3099ee1f67693c3c6c25ca7ecb150fcf88ac48c5374e000000001976a914a97d5d95cd416dc0f734cb028f0785a4f545cea988ac96ec0600',   'TxID添加':   '2ed056bed0417623433d6b600dfb6afcebb8c22b1f42b6e776cf8263289fb5ac',   'sigops':2,'体重':900,'费用':204345,'哈希':   '2ed056bed0417623433d6b600dfb6afcebb8c22b1f42b6e776cf8263289fb5ac'},   {'取决于':[],'数据':   '01000000011e7d9c88fe30a4c9fa1ec229e7c11704ec0185e36 ......(......其余部分   交易...)

2 个答案:

答案 0 :(得分:1)

比特币核心在块模板中没有提供coinbasetxn;这是池软件。如果你在不使用池的情况下编写挖掘软件直接连接到bitcoind,你需要自己生成coinbase事务。

答案 1 :(得分:-1)

确认它是交易清单的第一笔交易。可以关闭这个问题(不再需要帮助)。谢谢。