public void subscribeEventLog(EventProcessor p, SkipBlockID blockID)
public interface EventProcessor { void process(EventBatch es); void error(String s); }
public void unsubscribeEventLog(EventProcessor p)
to listen to new events. Where EventBatch represent all the events in a block, i.e., it includes a skipblock ID and a list of events in that block.
Writing the API this way will allow us to avoid adding any new server-side code, since ByzCoin can already listen to events. The client downloads all the blocks from the given blockID to the latest block, and at the same time starts the ByzCoin listening API. With the appropriate buffering, the client should be able to streaming all the events from the given blockID. Some work needs to be done to decode the transactions because we need to run the contract code to turn them into events. The contract code is not currently available on the client.
EventLog client need an API like this:
to listen to new events. Where
EventBatch
represent all the events in a block, i.e., it includes a skipblock ID and a list of events in that block.Writing the API this way will allow us to avoid adding any new server-side code, since ByzCoin can already listen to events. The client downloads all the blocks from the given blockID to the latest block, and at the same time starts the ByzCoin listening API. With the appropriate buffering, the client should be able to streaming all the events from the given blockID. Some work needs to be done to decode the transactions because we need to run the contract code to turn them into events. The contract code is not currently available on the client.