Skip to content

Commit 1e3c3c2

Browse files
committed
Add test coverage
1 parent 8e6a609 commit 1e3c3c2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/SFC.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ describe('SFC', () => {
394394
const node = new BlockchainNode(this.sfc);
395395
const [validator, secondValidator] = await ethers.getSigners();
396396
const pubkey =
397-
'0xc000a2941866e485442aa6b17d67d77f8a6c4580bb556894cc1618473eff1e18203d8cce50b563cf4c75e408886079b8f067069442ed52e2ac9e556baa3f8fcc525f';
397+
'0xc0040220af695ae100c370c7acff4f57e5a0c507abbbc8ac6cc2ae0ce3a81747e0cd3c6892233faae1af5d982d05b1c13a0ad4449685f0b5a6138b301cc5263f8316';
398398
const secondPubkey =
399-
'0xc000a2941866e485442aa6b17d67d77f8a6c4580bb556894cc1618473eff1e18203d8cce50b563cf4c75e408886079b8f067069442ed52e2ac9e556baa3f8fcc5251';
399+
'0xc00499a876465bc626061bb2f0326df1a223c14e3bcdc3fff3deb0f95f316b9d586b03f00bbc2349be3d7908de8626cfd8f7fd6f73bff49df1299f44b6855562c33d';
400400
await this.sfc.enableNonNodeCalls();
401401

402402
expect(await this.sfc.lastValidatorID()).to.equal(0);
@@ -428,6 +428,13 @@ describe('SFC', () => {
428428
expect(await this.sfc.getValidatorPubkey(firstValidatorID)).to.equal(pubkey);
429429
expect(await this.sfc.getValidatorPubkey(secondValidatorID)).to.equal(secondPubkey);
430430

431+
expect(await this.sfc.pubkeyAddressToValidatorID('0x65Db23D0c4FA8Ec58151a30E54e6a6046c97cD10')).to.equal(
432+
firstValidatorID,
433+
);
434+
expect(await this.sfc.pubkeyAddressToValidatorID('0x1AA3196683eE97Adf5B398875828E322a34E8085')).to.equal(
435+
secondValidatorID,
436+
);
437+
431438
const firstValidatorObj = await this.sfc.getValidator(firstValidatorID);
432439
const secondValidatorObj = await this.sfc.getValidator(secondValidatorID);
433440

@@ -695,7 +702,7 @@ describe('SFC', () => {
695702
expect(await this.sfc.rewardsStash(this.delegator, this.validatorId)).to.equal(9_180);
696703
});
697704

698-
it('Should succeed andupdate the validator on node', async function () {
705+
it('Should succeed and update the validator on node', async function () {
699706
await this.constants.updateOfflinePenaltyThresholdTime(10000);
700707
await this.constants.updateOfflinePenaltyThresholdBlocksNum(500);
701708

0 commit comments

Comments
 (0)