Beispiel #1
0
 @Override
 void putMyJSON(JSONObject attachment) {
   attachment.put("purchase", Convert.toUnsignedLong(purchaseId));
   attachment.put("goodsData", Convert.toHexString(goods.getData()));
   attachment.put("goodsNonce", Convert.toHexString(goods.getNonce()));
   attachment.put("discountNQT", discountNQT);
   attachment.put("goodsIsText", goodsIsText);
 }
Beispiel #2
0
 @Override
 void putMyBytes(ByteBuffer buffer) {
   buffer.putLong(purchaseId);
   buffer.putInt(
       goodsIsText ? goods.getData().length | Integer.MIN_VALUE : goods.getData().length);
   buffer.put(goods.getData());
   buffer.put(goods.getNonce());
   buffer.putLong(discountNQT);
 }