Skip to content

Commit

Permalink
fix: remove debug information
Browse files Browse the repository at this point in the history
  • Loading branch information
daveroga committed Nov 24, 2021
1 parent 146d511 commit ce2344e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
26 changes: 5 additions & 21 deletions test/e2e/nightfall-sdk.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
txPerBlock,
fee,
value,
// bond,
bond,
gasCosts,
tokenId,
tokenType,
Expand Down Expand Up @@ -85,8 +85,6 @@ describe('Testing the Nightfall SDK', () => {
web3 = await connectWeb3();
stateAddress = await nf3User1.getContractAddress('State');

console.log('onChainBlockCount: ', await getOnChainBlockCount());

await nf3User1.init(mnemonicUser1);
await nf3User2.init(mnemonicUser2); // 2nd client to do transfer tests and checks
await nf3Proposer1.init(mnemonicProposer);
Expand All @@ -95,6 +93,7 @@ describe('Testing the Nightfall SDK', () => {
await nf3Challenger.init(mnemonicChallenger);
await nf3LiquidityProvider.init(mnemonicLiquidityProvider);

console.log(' Last block on chain: ', await getOnChainBlockCount());
console.log(' Shield address: ', nf3User1.shieldContractAddress);
console.log(' State address: ', nf3User1.stateContractAddress);
console.log(' Proposers address: ', nf3User1.proposersContractAddress);
Expand Down Expand Up @@ -139,10 +138,6 @@ describe('Testing the Nightfall SDK', () => {
nodeInfo = await web3.eth.getNodeInfo();

web3.eth.subscribe('logs', { address: stateAddress }).on('data', log => {
console.log(
'---> log received: ',
log.topics[0] === topicEventMapping.BlockProposed ? 'BlockProposed' : log.topics[0],
);
// For event tracking, we use only care about the logs related to 'blockProposed'
if (log.topics[0] === topicEventMapping.BlockProposed) eventLogs.push('blockProposed');
});
Expand Down Expand Up @@ -171,7 +166,7 @@ describe('Testing the Nightfall SDK', () => {
});
});

/* describe('Basic Proposer tests', () => {
describe('Basic Proposer tests', () => {
it('should register a proposer', async () => {
let proposers;
({ proposers } = await nf3Proposer2.getProposers());
Expand Down Expand Up @@ -200,18 +195,7 @@ describe('Testing the Nightfall SDK', () => {
expect(thisProposer.length).to.be.equal(1);
});

/* it('should change current proposer', async function () {
let proposers;
({ proposers } = await nf3Proposer2.getProposers());
console.log('BEFORE changeCurrentProposer', proposers);
const res = await nf3Proposer2.changeCurrentProposer();
expectTransaction(res);
console.log(' TransactionHash: ', res.transactionHash);
({ proposers } = await nf3Proposer2.getProposers());
console.log('AFTER changeCurrentProposer', proposers);
}); */

/* it('should de-register a proposer', async () => {
it('should de-register a proposer', async () => {
let proposers;
({ proposers } = await nf3Proposer1.getProposers());
let thisProposer = proposers.filter(p => p.thisAddress === nf3Proposer1.ethereumAddress);
Expand Down Expand Up @@ -261,7 +245,7 @@ describe('Testing the Nightfall SDK', () => {
await nf3Proposer1.registerProposer();
});
});
*/

describe('Basic Challenger tests', () => {
it('should register a challenger', async () => {
const res = await nf3Challenger.registerChallenger();
Expand Down
2 changes: 0 additions & 2 deletions test/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,12 @@ export const depositNTransactions = async (nf3, N, ercAddress, tokenType, value,
// eslint-disable-next-line no-await-in-loop
const res = await nf3.deposit(ercAddress, tokenType, value, tokenId, fee);
expectTransaction(res);
console.log(' TransactionHash: ', res.transactionHash);
depositTransactions.push(res);
}
return depositTransactions;
};

export const waitForEvent = async (eventLogs, expectedEvents, count = 1) => {
console.log('Waiting for event...');
const length = count !== 1 ? count : expectedEvents.length;
let timeout = 10;
while (eventLogs.length < length) {
Expand Down

0 comments on commit ce2344e

Please sign in to comment.