use of org.aion.zero.impl.sync.handler.BroadcastNewBlockHandler in project aion by aionnetwork.
the class AionHub method registerCallback.
private void registerCallback() {
List<Handler> cbs = new ArrayList<>();
cbs.add(new ReqStatusHandler(syncLog, this.blockchain, this.p2pMgr, cfg.getGenesis().getHash()));
cbs.add(new ResStatusHandler(syncLog, this.p2pMgr, this.syncMgr));
cbs.add(new ReqBlocksHeadersHandler(syncLog, this.blockchain, this.p2pMgr, cfg.getSync().getBlocksImportMax()));
cbs.add(new ResBlocksHeadersHandler(syncLog, this.syncMgr));
cbs.add(new ReqBlocksBodiesHandler(syncLog, this.blockchain, this.p2pMgr, cfg.getSync().getBlocksImportMax()));
cbs.add(new ResBlocksBodiesHandler(syncLog, this.syncMgr));
cbs.add(new BroadcastTxHandler(syncLog, this.mempool, this.p2pMgr));
cbs.add(new BroadcastNewBlockHandler(syncLog, this.propHandler));
this.p2pMgr.register(cbs);
}
use of org.aion.zero.impl.sync.handler.BroadcastNewBlockHandler in project aion by aionnetwork.
the class AionHub method registerCallback.
private void registerCallback() {
List<Handler> cbs = new ArrayList<>();
cbs.add(new ReqStatusHandler(syncLOG, blockchain, mempool, p2pMgr, cfg.getGenesis().getHash(), apiVersion));
cbs.add(new ResStatusHandler(syncLOG, surveyLOG, p2pMgr, syncMgr));
boolean inSyncOnlyMode = cfg.getNet().getP2p().inSyncOnlyMode();
cbs.add(new ReqBlocksHeadersHandler(syncLOG, blockchain, p2pMgr, inSyncOnlyMode));
cbs.add(new ResBlocksHeadersHandler(syncLOG, surveyLOG, syncMgr));
cbs.add(new ReqBlocksBodiesHandler(syncLOG, blockchain, syncMgr, p2pMgr, inSyncOnlyMode));
cbs.add(new ResBlocksBodiesHandler(syncLOG, surveyLOG, syncMgr, p2pMgr));
cbs.add(new BroadcastTxHandler(syncLOG, mempool, p2pMgr, inSyncOnlyMode));
cbs.add(new BroadcastNewBlockHandler(syncLOG, surveyLOG, propHandler, p2pMgr));
this.p2pMgr.register(cbs);
}
Aggregations