Skip to content
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

Silence tests #483

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion debug_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"governance": true,
"i18n": true,
"ledger": true,
"masternode": true
"masternode": true,
"vanity_gen": true
}
9 changes: 7 additions & 2 deletions scripts/dashboard/VanityGen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ref, computed, watch, nextTick } from 'vue';
import { cChainParams } from '../chain_params.js';
import { MAP_B58 } from '../misc.js';
import { useAlerts } from '../composables/use_alerts.js';
import { debugLog, DebugTopics } from '../debug.js';

const { createAlert } = useAlerts();
const addressPrefix = ref('');
Expand Down Expand Up @@ -72,7 +73,10 @@ function generate() {
Math.floor(window.navigator.hardwareConcurrency * 0.75),
1
);
console.log('Spawning ' + nThreads + ' vanity search threads!');
debugLog(
DebugTopics.VANITY_GEN,
'Spawning ' + nThreads + ' vanity search threads!'
);
for (let i = 0; i < nThreads; i++) {
const worker = new Worker(
new URL('../vanitygen_worker.js', import.meta.url)
Expand All @@ -83,7 +87,8 @@ function generate() {
if (data.pub.substr(1, prefix.length).toLowerCase() === prefix) {
try {
emit('import-wallet', data.priv);
console.log(
debugLog(
DebugTopics.VANITY_GEN,
`VANITY: Found an address after ${attempts.value} attempts!`
);
} finally {
Expand Down
1 change: 1 addition & 0 deletions scripts/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const DebugTopics = {
I18N: new DebugTopic('[I18N]', 1 << 7),
LEDGER: new DebugTopic('[LEDGER]', 1 << 8),
MASTERNODE: new DebugTopic('[MASTERNODE]', 1 << 9),
VANITY_GEN: new DebugTopic('[VANITY_GEN]', 1 << 10),
};

let enabledDebug = 0;
Expand Down
3 changes: 3 additions & 0 deletions test_setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { vi } from 'vitest';
import 'fake-indexeddb/auto';
vi.spyOn(console, 'warn').mockImplementation((message) => {
if (message?.includes && message?.includes('[vue]')) return;
});

// We need to attach the component to a HTML,
// or .isVisible() function does not work
Expand Down
Loading