use of org.aion.mcf.core.TxTouchedStorage in project aion by aionnetwork.
the class AionTxExecSummary method decodeTouchedStorage.
protected static TxTouchedStorage decodeTouchedStorage(RLPElement encoded) {
TxTouchedStorage result = new TxTouchedStorage();
for (RLPElement entry : (RLPList) encoded) {
RLPList asList = (RLPList) entry;
DataWord key = new DataWord(asList.get(0).getRLPData());
DataWord value = new DataWord(asList.get(1).getRLPData());
byte[] changedBytes = asList.get(2).getRLPData();
boolean changed = isNotEmpty(changedBytes) && RLP.decodeInt(changedBytes, 0) == 1;
result.add(new TxTouchedStorage.Entry(key, value, changed));
}
return result;
}
Aggregations