etherscan-explorer
etherscan-explorer copied to clipboard
If need add the from address into account -- ConverterFunctionUtil
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);
};
As far as I'm concerned, "toAddress" is enough if considering UTXO model.