Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Stellar -> Ethereum withdrawal endpoint #87

Merged
merged 3 commits into from
Jul 8, 2022
Merged

Stellar -> Ethereum withdrawal endpoint #87

merged 3 commits into from
Jul 8, 2022

Conversation

tamirms
Copy link
Contributor

@tamirms tamirms commented Jul 6, 2022

Fixes #73 , #75

@tamirms tamirms force-pushed the eth-withdrawal branch 2 times, most recently from c6fd5dc to bada114 Compare July 8, 2022 02:31
@tamirms tamirms changed the title [WIP} Stellar -> Eth withdrawal endpoint Stellar -> Eth withdrawal endpoint Jul 8, 2022
@tamirms tamirms marked this pull request as ready for review July 8, 2022 10:37
@tamirms tamirms changed the title Stellar -> Eth withdrawal endpoint Stellar -> Ethereum withdrawal endpoint Jul 8, 2022
Comment on lines +70 to +72
if latest.Number <= s.EthereumFinalityBuffer {
return EthereumWithdrawalDetails{}, EthereumNodeBehind
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this condition? Isn't it almost always going to be false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it should always be false. the only situation where it will be true is if the ethereum node is somehow starting from scratch and catching up from the first block in history

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that condition to prevent an integer underflow when evaluating latest.Number-s.EthereumFinalityBuffer in the lines of code below

backend/asset_converter.go Outdated Show resolved Hide resolved
Co-authored-by: Bartek Nowotarski <bartek@nowotarski.info>
@tamirms tamirms merged commit 11e80d3 into main Jul 8, 2022
@tamirms tamirms deleted the eth-withdrawal branch July 8, 2022 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Stellar -> Ethereum withdrawal endpoint
2 participants