在JSONRPC WIKI页面中,有一个名为eth_newFilter的方法,通过这个函数,我们可以订阅我们需要的特定事件日志。
我们可以通过eth_getFilterChanges获得订阅。而回报就像
removed: TAG - true when the log was removed, due to a chain reorganization. false if its a valid log.
logIndex: QUANTITY - integer of the log index position in the block. null when its pending log.
...但是我在那里发现返回json对象中没有删除字段。
返回值如下:
{u'blockHash': u'0xc9589fbc55d19d1b2071ef0b9a55ac0391ee6f2219b50264764faa8e81e46abc', u'transactionHash': u'0x7770cf630cc76edbe83ab2f10fd3a05995f9c8d21c6a94c8ef8c3311db4b0f0e', u'transactionIndex': u'0x7', u'topics': [u'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', u'0x000000000000000000000000414755edffa43707f7d51600edf9ecbe57152a8a', u'0x0000000000000000000000007b277e894b11daedaecfdd2b2d931c2270927f9e'], u'blockNumber': u'0x20ae14', u'address': u'0xafe6851c1d9ee2e759acdee8cfc827e22a9ec5d7', u'logIndex': u'0x1', u'data': u'0x00000000000000000000000000000000000000000000000000000000000004e1'}那么,是否存在我的pyethapp版本不正确,或者geth客户端版本不正确,或者该字段已被废弃?如果已不推荐此字段,如何检测此日志是在reorg块中还是在普通块中?
我的聚乙烯版:1.2.3,geth版本:1.4.10-stable-585996f9
发布于 2016-09-08 02:15:08
这是github发行版中描述的一个bug,这里是链接,它已经在开发分支中得到了修复,但是还没有发布任何版本。
https://ethereum.stackexchange.com/questions/8518
复制相似问题