@Test public void toBytes() throws Exception { LimitOrderCancelOperation operation = new LimitOrderCancelOperation(limitOrder, feePayingAccount); operation.setFee(new AssetAmount(UnsignedLong.valueOf(2), CORE_ASSET)); byte[] serialized = operation.toBytes(); assertArrayEquals("Correct serialization", Util.hexToBytes("020000000000000000cbe108e187900100"), serialized); }
@Override public byte[] toBytes() { byte[] feeBytes = this.fee.toBytes(); byte[] feePayingAccountBytes = this.feePayingAccount.toBytes(); byte[] orderIdBytes = this.order.toBytes(); byte[] extensions = this.extensions.toBytes(); return Bytes.concat(feeBytes, feePayingAccountBytes, orderIdBytes, extensions); }
LimitOrderCancelOperation extends BaseOperation { @Override public byte[] toBytes() { byte[] feeBytes = this.fee.toBytes(); byte[] feePayingAccountBytes = this.feePayingAccount.toBytes(); byte[] orderIdBytes = this.order.toBytes(); byte[] extensions = this.extensions.toBytes(); return Bytes.concat(feeBytes, feePayingAccountBytes, orderIdBytes, extensions); } }
LimitOrderCancelOperation extends BaseOperation { @Override public byte[] toBytes() { byte[] feeBytes = this.fee.toBytes(); byte[] feePayingAccountBytes = this.feePayingAccount.toBytes(); byte[] orderIdBytes = this.order.toBytes(); byte[] extensions = this.extensions.toBytes(); return Bytes.concat(feeBytes, feePayingAccountBytes, orderIdBytes, extensions); } LimitOrderCancelOperation(LimitOrder order, UserAccount feePayingAccount); }
LimitOrderCancelOperation extends BaseOperation { @Override public byte[] toBytes() { byte[] feeBytes = this.fee.toBytes(); byte[] feePayingAccountBytes = this.feePayingAccount.toBytes(); byte[] orderIdBytes = this.order.toBytes(); byte[] extensions = this.extensions.toBytes(); return Bytes.concat(feeBytes, feePayingAccountBytes, orderIdBytes, extensions); } LimitOrderCancelOperation(LimitOrder order, UserAccount feePayingAccount); @Override String toJsonString(); @Override JsonElement toJsonObject(); @Override void setFee(AssetAmount assetAmount); @Override byte[] toBytes(); }
LimitOrderCancelOperation extends BaseOperation { @Override public byte[] toBytes() { byte[] feeBytes = this.fee.toBytes(); byte[] feePayingAccountBytes = this.feePayingAccount.toBytes(); byte[] orderIdBytes = this.order.toBytes(); byte[] extensions = this.extensions.toBytes(); return Bytes.concat(feeBytes, feePayingAccountBytes, orderIdBytes, extensions); } LimitOrderCancelOperation(LimitOrder order, UserAccount feePayingAccount); @Override String toJsonString(); @Override JsonElement toJsonObject(); @Override void setFee(AssetAmount assetAmount); @Override byte[] toBytes(); static final String KEY_FEE_PAYING_ACCOUNT; static final String KEY_ORDER_ID; }