In JSONRPC WIKI page, there is an method called eth_newFilter
, though this function, we can subscribe the specific event logs we need.
We can get the subscription via eth_getFilterChanges
. And the return just like
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.
...
But i found there it no removed field in the return json object.
the return value like that:
{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'}
So Is there my pyethapp version not correct or the geth client version not correct or this field has been DEPRECATED ? If this field has been DEPRECATED, how to detect whether this log is in a reorg block or a normal block?
My pyethapp version: 1.2.3
My geth version: 1.4.10-stable-585996f9