SMP protocol: optimize batching transactions, remove Builder (#961)

* remove Builder

* fewer chunks

* remove lazy bytestrings

* optimize

* pad
This commit is contained in:
Evgeny Poberezkin
2024-01-14 20:42:47 +00:00
committed by GitHub
parent cd4329f2de
commit 7f7a77c4eb
17 changed files with 64 additions and 149 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ smpServerTest _ t = runSmpTest $ \h -> tPut' h t >> tGet' h
tPut' :: THandle c -> (Maybe C.ASignature, ByteString, ByteString, smp) -> IO ()
tPut' h@THandle {sessionId} (sig, corrId, queueId, smp) = do
let t' = smpEncode (sessionId, corrId, queueId, smp)
[Right ()] <- tPut h Nothing [(sig, t')]
[Right ()] <- tPut h [(sig, t')]
pure ()
tGet' h = do
[(Nothing, _, (CorrId corrId, qId, Right cmd))] <- tGet h