-
Notifications
You must be signed in to change notification settings - Fork 212
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
handle floating promises in /inter-protocol and /vats #7760
Conversation
@@ -96,7 +96,7 @@ const scheduleLiquidationWakeups = async ( | |||
if (TimeMath.compareAbs(now, nominalStart) > 0) { | |||
if (TimeMath.compareAbs(now, endTime) < 0) { | |||
if (cancelToken) { | |||
E(timer).cancel(cancelToken); | |||
void E(timer).cancel(cancelToken); |
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.
If we don't wait, I think we should assign a new token so the old one doesn't get used to soon.
cancelToken = makeCancelToken();
@@ -176,7 +177,7 @@ export const makeScheduler = async ( | |||
'Unable to start auction cleanly. skipping this auction round.', | |||
), | |||
); | |||
finishAuctionRound(); | |||
await finishAuctionRound(); |
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.
Why? finishAuctionRound()
isn't async.
@@ -188,15 +189,15 @@ export const makeScheduler = async ( | |||
case 'before': | |||
break; | |||
case 'during': | |||
advanceRound(); | |||
await advanceRound(); |
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.
nor is advanceRound()
.
// This schedule is published as a side effect of closing out the incomplete | ||
// auction. The next one follows immediately and is correct. |
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.
Also removed in another pending PR.
myAddressNameAdmin.reserve(WalletName.depositFacet); | ||
// This may not finish before another reserve() call, but this one will win | ||
void myAddressNameAdmin.reserve(WalletName.depositFacet); |
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.
makeMyAddressNameAdminKit
is deprecated, yes? I'm not confident how this solo client stuff should work. I'd be inclined to have ci continue to gripe about it. Or leave an XXX
or something.
myAddressNameAdmin.reserve(WalletName.depositFacet); | ||
// This may not finish before another reserve() call, but this one will win | ||
void myAddressNameAdmin.reserve(WalletName.depositFacet); |
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.
Again, I'm not confident about this.
this.state.mint || Fail`minter cannot retain without a mint.`; | ||
!!this.state.mint || Fail`minter cannot retain without a mint.`; |
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.
👍
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.
As discussed, if the changes for auctions and liquidation are moved to a different PR, I'm fine with what remains. We can discuss them there.
refs: #6000
Description
Because we don't have the floating promise lint in CI, they creep back. The last time inter-protocol was cleared:
This clears them again. To do so it reworks a few promise handling flows. Those are in separate commits from the mechanical ones.
This is stacked upon #7752 because that changes shortfall reporting in a way that was relevant to the test changes here.
This
hasomits changes that are related to auction fixes:Security Considerations
n/a
Scaling Considerations
n/a
Documentation Considerations
n/a
Testing Considerations
Revised tests. The vaults-upgrade bootstrapTest had to shrink in scope.