-
Notifications
You must be signed in to change notification settings - Fork 10
Misha/await status change rework #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- added chain-index polling interval and timeout - todo: config and tests
- tests added - config spec added - bugs fixed - todo: docs, refactoring, testnet tests
- docs - clenaup - testnet tested
| | start + n <= tip'.block -> pure () | ||
| _ -> go start | ||
| -- -- | Wait for n Blocks. | ||
| -- awaitNBlocks :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be removed
| netId | ||
| socket | ||
| where | ||
| -- This parameter needed only for the Byron era. Since the Byron |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this explanation somewhere in latest node commits
|
For some reason it breaks Plutip's tests with |
4134755 to
bcea30f
Compare
The problem was not caused directly by this rework, but fix committed here as well. |
This PR introduce changes in
awaitTxStatusChangemaking it closer to what real PAB is doing - it waits until transaction status will change fromUnknownto anything else with some nuances:chain-indexto get transaction, if transaction not found status is considered to beUnknownand it will keep queryingUnknownand it will keep queryingchain-indexis configurable viaPABConfigPABConfig. Timeout required for the case, when transaction is (silently) discarded from node mempool. In this case transaction will never show up on chain and awaiting can loop forever. After timeout is reached, status from the last check will be returned, it can beUnknownas well, soawaitTxConfirmedwhich is implemented viaawaitTxStatusChangecan still loop forever. Upcoming node release will introduce queries to mempool inCardano.Api- maybe it could be a replacement for timeout.