Closed rhyslbw closed 3 years ago
UnknownResultError
is actually just a guard against response.result
not equalling RollBackward
or RollForward
if response.methodname === 'RequestNext'
.
https://github.com/KtorZ/cardano-ogmios/blob/990ffa69f006f3ab82ebfe84997f4a8541697cbc/clients/TypeScript/packages/client/src/ChainSync/ChainSyncClient.ts#L44-L60
The standalone queries handlers use a request identifier: https://github.com/KtorZ/cardano-ogmios/blob/990ffa69f006f3ab82ebfe84997f4a8541697cbc/clients/TypeScript/packages/client/src/StateQuery/queries/ledgerTip.ts#L19
... however since the listener is registered with once
, there still is a scenario where the handler could be torn down prior to receiving the query result. I'll see if there's another way to manage the listener tear down @KtorZ
Describe your idea, in simple words.
https://github.com/KtorZ/cardano-ogmios/pull/37#discussion_r627042048
Why is it a good idea?
https://github.com/KtorZ/cardano-ogmios/pull/37#discussion_r626759455
Are you willing to work on it yourself?
Yes