Skip to content
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

Fix transaction withReference and use in followChain #881

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

dguenther
Copy link
Member

Summary

Added a transaction.withReference around the transaction use in followChain to avoid some duplicate deserialization calls.

I also noticed that transaction.withReference wasn't working correctly for async callbacks -- The callback would execute, then call the finally to drop the reference before the callback was finished. Fixed this without making transaction.withReference async by creating a separate Promise.resolve() to wrap the result and calling finally on that one.

Testing Plan

Synced a fresh database locally and also ran a node that was already synced up. Ran followChain with these changes to make sure it still works

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes
[x] No

@dguenther dguenther requested a review from a team as a code owner January 12, 2022 00:13
@dguenther
Copy link
Member Author

Investigating test failures on this -- it may end up changing the substance of the PR

@dguenther
Copy link
Member Author

All right, tests pass now.

@dguenther dguenther merged commit e0f94f1 into staging Jan 13, 2022
@dguenther dguenther deleted the fix-transaction-reference branch January 13, 2022 23:54
NullSoldier pushed a commit that referenced this pull request Jan 14, 2022
* Fix transaction withReference and use in followChain

* Update failing test
NullSoldier pushed a commit that referenced this pull request Jan 15, 2022
* Fix transaction withReference and use in followChain

* Update failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants