diff --git a/phoenix/src/test/java/PhoenixTest.java b/phoenix/src/test/java/PhoenixTest.java index b680b42..b07859e 100644 --- a/phoenix/src/test/java/PhoenixTest.java +++ b/phoenix/src/test/java/PhoenixTest.java @@ -153,9 +153,15 @@ public void phoenixGetMarketDetailTest() throws RpcException, IOException { }); var traders = phoenixMarket.getTraders(); - traders.forEach((publicKey, phoenixTraderState) -> { - log.info("Trader Pubkey: {}, State: {}", publicKey.toBase58(), phoenixTraderState.toString()); - }); +// traders.forEach((publicKey, phoenixTraderState) -> { +// log.info("Trader Pubkey: {}, State: {}", publicKey.toBase58(), phoenixTraderState.toString()); +// }); + + traders.entrySet().stream().sorted((o1, o2) -> Math.toIntExact((int) o2.getValue().getQuoteLotsLocked() - (int) o1.getValue().getQuoteLotsLocked())) + .forEach(publicKeyPhoenixTraderStateEntry -> { + log.info("Trader Pubkey: {}, State: {}", publicKeyPhoenixTraderStateEntry.getKey().toBase58(), + publicKeyPhoenixTraderStateEntry.getValue().toString()); + }); } @Test