Function<EthBlock.Block, List<Account>> toAccounts
= blk -> {
Set<Account> accountSet = new HashSet<>();
accountSet.add(new Account.Builder().hash(blk.getMiner()).build());
for (EthBlock.TransactionResult txResult : blk.getTransactions()) {
EthBlock.TransactionObject tx = (EthBlock.TransactionObject) txResult;
if (null != tx.getTo()) {
accountSet.add(new Account.Builder().hash(tx.getTo()).build());
}
//xys
//TODO: if need add the from address into account list???
}
return new ArrayList<>(accountSet);
};