Skip to content

Commit 11b3bae

Browse files
committed
feat: make depositVerifier be updated right at newDepositVerifierMaturityTimestamp
All other places would make the update take effect right on the timestamp instead of timestamp + 1. This change makes it to be consistent with others.
1 parent bbc4132 commit 11b3bae

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

plasma_framework/contracts/src/vaults/Vault.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ contract Vault is Operated {
6363
* @return contract address of deposit verifier.
6464
*/
6565
function getEffectiveDepositVerifier() public view returns (address) {
66-
if (now > newDepositVerifierMaturityTimestamp) {
67-
return depositVerifiers[1];
68-
} else {
66+
if (now < newDepositVerifierMaturityTimestamp) {
6967
return depositVerifiers[0];
68+
} else {
69+
return depositVerifiers[1];
7070
}
7171
}
7272
}

plasma_framework/test/src/utils/BondSize.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const BondSizeMock = artifacts.require('BondSizeMock');
22
const { BN, expectRevert, time } = require('openzeppelin-test-helpers');
33
const { expect } = require('chai');
44

5-
contract.only('BondSize', () => {
5+
contract('BondSize', () => {
66
const WAITING_PERIOD = time.duration.days(2);
77
const HALF_WAITING_PERIOD = WAITING_PERIOD.divn(2);
88

plasma_framework/test/src/vaults/EthVault.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ contract('EthVault', ([_, alice]) => {
152152
expect(await this.ethVault.getEffectiveDepositVerifier()).to.equal(this.currentDepositVerifier);
153153
await expectEvent.inLogs(tx.logs, 'SetDepositVerifierCalled', { nextDepositVerifier: newDepositVerifier.address });
154154

155-
await time.increase(MIN_EXIT_PERIOD + 1);
155+
await time.increase(MIN_EXIT_PERIOD);
156156
expect(await this.ethVault.getEffectiveDepositVerifier()).to.equal(newDepositVerifier.address);
157157
});
158158
});

0 commit comments

Comments
 (0)