-
Notifications
You must be signed in to change notification settings - Fork 267
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
Create new settleReleaseRequest method to perform common actions when creating pegouts #2692
Create new settleReleaseRequest method to perform common actions when creating pegouts #2692
Conversation
… creating pegouts
pegoutsWaitingForConfirmations.add(pegoutTransaction, rskExecutionBlockNumber, releaseCreationTxHash); | ||
} | ||
|
||
private void savePegoutTxSigHash(BtcTransaction pegoutTx) { |
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 method was not modified, only moved to be closed where its being used.
Quality Gate passedIssues Measures |
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.
Looking nice and clean. Well done!
} | ||
} else { | ||
pegoutWaitingForConfirmations.add(generatedTransaction, rskExecutionBlock.getNumber()); | ||
private void settleReleaseRequest(PegoutsWaitingForConfirmations pegoutsWaitingForConfirmations, BtcTransaction pegoutTransaction, Keccak256 releaseCreationTxHash, Coin requestedAmount) { |
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.
I don't think we need to pass around the pegoutsWaitingForConfirmations
, we can simply get it from the storageProvider right?
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.
yes, thats right, but the getPegoutsWaitingForConfirmations
could throw an IOException
that has to be handled all over the code. See for example in processPegoutsInBatch and processPegoutsIndividually, that the map is an input of the method already handled in processPegoutRequests method.
I thought it was better to do it this way to have less impact. But let me know what you think!
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.
Yeah, no big deal. Thanks
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.
thanks to you :)
2c6380e
into
feature/powpeg_validation_protocol
-Create a new settleReleaseRequest that perform all the needed actions whenever creating a pegout.
-Get rid of existing addToPegoutsWaitingForConfirmations method.