use of org.aion.zero.impl.blockchain.AionPendingStateImpl in project aion by aionnetwork.
the class ApiAion method getBlockTemplate.
public AionBlock getBlockTemplate() {
// TODO: Change to follow onBlockTemplate event mode defined in internal
// miner
// TODO: Track multiple block templates
AionBlock bestPendingState = ((AionPendingStateImpl) ac.getAionHub().getPendingState()).getBestBlock();
AionPendingStateImpl.TransactionSortedSet ret = new AionPendingStateImpl.TransactionSortedSet();
ret.addAll(ac.getAionHub().getPendingState().getPendingTransactions());
return ac.getAionHub().getBlockchain().createNewBlock(bestPendingState, new ArrayList<>(ret), false);
}
Aggregations