use of org.ethereum.util.RLPList in project rskj by rsksmart.
the class ReceiptStoreImpl method getAll.
@Override
public List<TransactionInfo> getAll(byte[] transactionHash) {
byte[] txsBytes = receiptsDS.get(transactionHash);
if (txsBytes == null || txsBytes.length == 0) {
return new ArrayList<TransactionInfo>();
}
List<TransactionInfo> txsInfo = new ArrayList<>();
RLPList txsList = (RLPList) RLP.decode2(txsBytes).get(0);
for (int i = 0; i < txsList.size(); ++i) {
RLPList rlpData = ((RLPList) txsList.get(i));
txsInfo.add(new TransactionInfo(rlpData.getRLPData()));
}
return txsInfo;
}
use of org.ethereum.util.RLPList in project rskj by rsksmart.
the class BlockBodiesMessage method parse.
private void parse() {
RLPList paramsList = (RLPList) RLP.decode2(encoded).get(0);
blockBodies = new ArrayList<>();
for (int i = 0; i < paramsList.size(); ++i) {
RLPList rlpData = ((RLPList) paramsList.get(i));
blockBodies.add(rlpData.getRLPData());
}
parsed = true;
}
use of org.ethereum.util.RLPList in project rskj by rsksmart.
the class GetBlockBodiesMessage method parse.
private void parse() {
RLPList paramsList = (RLPList) RLP.decode2(encoded).get(0);
blockHashes = new ArrayList<>();
for (int i = 0; i < paramsList.size(); ++i) {
blockHashes.add(paramsList.get(i).getRLPData());
}
parsed = true;
}
use of org.ethereum.util.RLPList in project rskj by rsksmart.
the class NewBlockHashesMessage method parse.
private void parse() {
RLPList paramsList = (RLPList) RLP.decode2(encoded).get(0);
blockIdentifiers = new ArrayList<>();
for (int i = 0; i < paramsList.size(); ++i) {
RLPList rlpData = ((RLPList) paramsList.get(i));
blockIdentifiers.add(new BlockIdentifier(rlpData));
}
parsed = true;
}
use of org.ethereum.util.RLPList in project rskj by rsksmart.
the class NewBlockMessage method parse.
private void parse() {
RLPList paramsList = (RLPList) RLP.decode2(encoded).get(0);
RLPList blockRLP = ((RLPList) paramsList.get(0));
block = new Block(blockRLP.getRLPData());
difficulty = paramsList.get(1).getRLPData();
parsed = true;
}
Aggregations