-
Notifications
You must be signed in to change notification settings - Fork 266
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
Register fundtx change #2714
base: save_fund_tx_signed_instead_of_hash
Are you sure you want to change the base?
Register fundtx change #2714
Conversation
73703d4
to
4d18d92
Compare
3d4d58a
to
e5cce24
Compare
2f80201
to
9be77e9
Compare
4d18d92
to
f84b459
Compare
9be77e9
to
0b60713
Compare
ec70cd5
to
9e90491
Compare
66acf35
to
24ec5c2
Compare
18f5cb9
to
56119ab
Compare
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.
LGTM, good job! Left two last comments for your consideration
return svpFundTransaction; | ||
} | ||
|
||
private BtcTransaction createAndSavePegout() { |
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.
Out of curiosity, for these private utility methods, are we sure they dont already exist? Or something similar?
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 checked and didn't found anything!
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.
All transactions creation are done manually
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.
LGTM.
6a3fd9f
to
a6e294a
Compare
a6e294a
to
8256285
Compare
Quality Gate passedIssues Measures |
14712e3
to
45b96c4
Compare
Background
Since the fund transaction will be treated as a pegout, its change will eventually be attempted to be registered through existing
registerBtcTransaction
method.When that happen, and after recognizing and processing it as a pegout, we have to save its hash (now signed) in the corresponding storage entry, that meaning we have to add some extra checks to recognize this special transaction.
So, if validation process is ongoing, we will check if the received transaction is the fund transaction.
We say that the validation process is ongoing if: proposedFederation exists, and validation period is not ended, i.e., currentRskBlock < proposedFederationCreationBlockNumber + svpPeriodDuration
.
IN THIS PR
This pr creates a new private method,
processSvpFundTransactionHashSigned
, that:svpFundTransactionSignedHash
storage entry, and the value saved in svpFundTransactionUnsignedHash storage entry is removed