-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop one of the validators, make sure the period is not submitted, run again and make sure the period has went through
- Loading branch information
Showing
9 changed files
with
212 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ Dockerfile | |
out/ | ||
build/ | ||
.github/ | ||
.node_modules/ | ||
.node_modules/ | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
build/* | ||
out | ||
process.json | ||
process.json | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const chai = require("chai"); | ||
const chaiAsPromised = require("chai-as-promised"); | ||
|
||
const exitUnspent = require('./actions/exitUnspent'); | ||
const minePeriod = require('./actions/minePeriod'); | ||
const { sleep } = require('../src/helpers'); | ||
|
||
chai.use(chaiAsPromised); | ||
const expect = chai.expect; | ||
|
||
|
||
module.exports = async function(contracts, [node1, node2], accounts, wallet) { | ||
const alice = accounts[0]; | ||
const submissions = []; | ||
|
||
contracts.operator.on("Submission", (...args) => { | ||
console.log(args); | ||
submissions.push(args); | ||
}); | ||
|
||
//node2.stop(); | ||
await minePeriod(node1, accounts); | ||
console.log('Try to exit..'); | ||
await sleep(4000); | ||
expect(submissions.length).to.equal(0); | ||
await expect(exitUnspent(contracts, node1, wallet, alice)).to.eventually.be.rejectedWith(""); | ||
|
||
await node2.start(); | ||
await sleep(2000); | ||
console.log('Try to exit again..'); | ||
expect(submissions.length).to.equal(1); | ||
await exitUnspent(contracts, node1, wallet, alice); | ||
} |
Oops, something went wrong.