-
Notifications
You must be signed in to change notification settings - Fork 224
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
[Test] contract staking test contract #4976
[Test] contract staking test contract #4976
Conversation
…ct-staking-test-contract
if let Some(StoredValue::Unbonding(unbonding_purses)) = | ||
tc.get(&key).map_err(Into::<ProtocolUpgradeError>::into)? | ||
{ | ||
// prune away the original record, we don't need it anymore |
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.
Should we have an if condition to only migrate unbonding purses based on the unbonding delay, i.e what we did for redelegate, only migrate the purses that are yet to be paid
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.
Maybe. However, the original logic was a stored value of a vec of unbonding purses which were being popped off for a pseudo prune so there shouldn't be any such records.
On that note tho, an optimization to not write the record if unbond.eras().len() == 0 would certainly be feasible.
bors r+ |
@@ -479,6 +479,11 @@ where | |||
&self.runtime_footprint | |||
} | |||
|
|||
/// Returns the addressable entity being used by this instance. |
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.
Just noticed this docu comment is wrong. Should be:
"Returns a mutable reference to the runtime footprint used by this instance."
Build succeeded: |
2bdfb49
into
casper-network:feat-2.0
Related issue #4929 |
This PR adds a test contract for contract staking to prevent regression.