use of org.aion.evtmgr.impl.callback.EventCallback in project aion by aionnetwork.
the class AionPendingStateImpl method init.
public void init(final AionBlockchainImpl blockchain) {
this.blockchain = blockchain;
this.transactionStore = blockchain.getTransactionStore();
this.evtMgr = blockchain.getEventMgr();
this.pendingTxCache = new PendingTxCache(CfgAion.inst().getTx().getCacheMax());
this.pendingState = repository.startTracking();
ees = new EventExecuteService(1000, "EpPS", Thread.MAX_PRIORITY, LOG);
ees.setFilter(setEvtFilter());
regBlockEvents();
IHandler blkHandler = this.evtMgr.getHandler(2);
if (blkHandler != null) {
blkHandler.eventCallback(new EventCallback(ees, LOG));
}
ees.start(new EpPS());
}
use of org.aion.evtmgr.impl.callback.EventCallback in project aion by aionnetwork.
the class AionPoW method registerCallback.
/**
* Registers callback for the
* {@link org.aion.evtmgr.impl.evt.EventConsensus.CALLBACK#ON_SOLUTION}
* event.
*/
public void registerCallback() {
IHandler consensusHandler = eventMgr.getHandler(IHandler.TYPE.CONSENSUS.getValue());
consensusHandler.eventCallback(new EventCallback(ees, LOG));
IHandler blockHandler = eventMgr.getHandler(IHandler.TYPE.BLOCK0.getValue());
blockHandler.eventCallback(new EventCallback(ees, LOG));
IHandler transactionHandler = eventMgr.getHandler(IHandler.TYPE.TX0.getValue());
transactionHandler.eventCallback(new EventCallback(ees, LOG));
}
Aggregations