use of org.xel.Appendix in project elastic-core-maven by OrdinaryDude.
the class GetTaggedDataExtendTransactions method processRequest.
@Override
protected JSONStreamAware processRequest(HttpServletRequest req) throws NxtException {
long taggedDataId = ParameterParser.getUnsignedLong(req, "transaction", true);
List<Long> extendTransactions = TaggedData.getExtendTransactionIds(taggedDataId);
JSONObject response = new JSONObject();
JSONArray jsonArray = new JSONArray();
Blockchain blockchain = Nxt.getBlockchain();
Filter<Appendix> filter = (appendix) -> !(appendix instanceof Attachment.TaggedDataExtend);
extendTransactions.forEach(transactionId -> jsonArray.add(JSONData.transaction(blockchain.getTransaction(transactionId), filter)));
response.put("extendTransactions", jsonArray);
return response;
}
Aggregations