Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

KinClient.createPaymentListener experiences delays in production, but not testnet. #51

Open
radicaled opened this issue Oct 25, 2019 · 1 comment

Comments

@radicaled
Copy link

Our backend uses KinClient.createPaymentListener in order to detect user spends and disburse any required good/service/etc. We are monitoring our own account.

On testnet, everything is fine. There's a minor delay before the payment listener is triggered, but it's only 20s-30s -- manageable.

On production, it takes a variable amount of time for the payment listener to be triggered. 10 minutes, 15 minutes, etc. Sometimes it's not triggered at all.

We've confirmed via the Kin Laboratory that the transactions hit the blockchain rather quickly (as far as I can tell anyway).

We're not quite sure what the delay is about, or why the difference in speed exists between testnet and production.

@Blahartinger
Copy link

That sounds far too long in either case you describe. It should be triggered almost immediately after the payment is confirmed...5s after it was submitted to horizon. This sounds like the event streaming on this SDK ( or the one that powers it https://github.com/kinecosystem/js-kin-sdk/blob/master/src/call_builder.js seems like the place where streams are kicked off ) is buggy. You can see in what I've linked that there is a reconnect timeout of 15s..this would explain your 15+s delays of there were a borked stream and it had to reconnect but minutes is crazy and definitely not expected. I'm not a js expert by any means but I'll see if I can take a deeper look on Monday or work with someone who is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants