agent: rename functions, remove unused code, stabilize tests (#830)

* agent: rename functions, stabilize tests

* test pattern match
This commit is contained in:
Evgeny Poberezkin
2023-08-24 19:52:58 +01:00
committed by GitHub
parent ec268e2006
commit b001b748db
7 changed files with 139 additions and 196 deletions
+3 -3
View File
@@ -417,10 +417,10 @@ getChunkDigest XFTPChunkSpec {filePath = chunkPath, chunkOffset, chunkSize} =
cliReceiveFile :: ReceiveOptions -> ExceptT CLIError IO ()
cliReceiveFile ReceiveOptions {fileDescription, filePath, retryCount, tempPath, verbose, yes} =
getFileDescription' fileDescription >>= receiveFile
getFileDescription' fileDescription >>= receive
where
receiveFile :: ValidFileDescription 'FRecipient -> ExceptT CLIError IO ()
receiveFile (ValidFileDescription FileDescription {size, digest, key, nonce, chunks}) = do
receive :: ValidFileDescription 'FRecipient -> ExceptT CLIError IO ()
receive (ValidFileDescription FileDescription {size, digest, key, nonce, chunks}) = do
encPath <- getEncPath tempPath "xftp"
createDirectory encPath
a <- atomically $ newXFTPAgent defaultXFTPClientAgentConfig