Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit fa08a88

Browse files
undo tracing code for an issue in the pipe line
1 parent e627ffd commit fa08a88

File tree

2 files changed

+9
-52
lines changed

2 files changed

+9
-52
lines changed

scripts/gen_accounts.js

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,12 @@ const addAccount = async (address, privateKey) => {
2121
mainAcc = accountList[0];
2222
}
2323
const web3Eth = new Web3Eth(clientUrl);
24-
console.error('accountList', accountList);
25-
console.error('address', address);
26-
console.error('privateKey', privateKey);
27-
if (!accountList.find(acc => acc.address === address)) {
28-
try {
29-
console.log('gen_accounts.js: getSystemTestBackend() ', getSystemTestBackend());
30-
console.log(
31-
"gen_accounts.js: getSystemTestBackend() === 'geth' ",
32-
getSystemTestBackend() === 'geth',
33-
);
3424

35-
const modifiedPrivateKey =
36-
getSystemTestBackend() === 'geth' ? privateKey.slice(2) : privateKey;
37-
console.log('gen_accounts.js: import for modifiedPrivateKey: ', modifiedPrivateKey);
38-
await web3Personal.importRawKey(modifiedPrivateKey, '123456');
39-
console.log('gen_accounts.js: import for modifiedPrivateKey succeeded');
40-
} catch (error) {
41-
console.error(error);
42-
if (getSystemTestBackend() === 'geth') {
43-
console.warn(
44-
'gen_accounts.js: The function importRawKey did not work for geth when removing `0x` from private key. Try without removing it...',
45-
);
46-
console.log('gen_accounts.js: import for privateKey: ', privateKey);
47-
await web3Personal.importRawKey(privateKey, '123456');
48-
console.log('gen_accounts.js: import for privateKey succeeded');
49-
}
50-
}
25+
if (!accountList.find(acc => acc.address === address)) {
26+
await web3Personal.importRawKey(
27+
getSystemTestBackend() === 'geth' ? privateKey.slice(2) : privateKey,
28+
'123456',
29+
);
5130
}
5231

5332
await web3Eth.sendTransaction({

scripts/system_tests_utils.ts

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -192,32 +192,10 @@ export const createNewAccount = async (config?: {
192192
if (config?.unlock) {
193193
const web3Personal = new Personal(clientUrl);
194194
if (!config?.doNotImport) {
195-
try {
196-
const privateKey =
197-
getSystemTestBackend() === 'geth' ? acc.privateKey.slice(2) : acc.privateKey;
198-
// eslint-disable-next-line no-console
199-
console.log('system_tests_utils.ts: import for privateKey: ', privateKey);
200-
await web3Personal.importRawKey(privateKey, config.password ?? '123456');
201-
// eslint-disable-next-line no-console
202-
console.log('system_tests_utils.ts: import for privateKey succeeded ', privateKey);
203-
} catch (error) {
204-
if (getSystemTestBackend() === 'geth') {
205-
console.warn(
206-
'system_tests_utils.ts: The function importRawKey did not work for geth when removing `0x` from private key. Try without removing it...',
207-
);
208-
// eslint-disable-next-line no-console
209-
console.log(
210-
'system_tests_utils.ts: system_tests_utils.ts: import for privateKey: ',
211-
acc.privateKey,
212-
);
213-
await web3Personal.importRawKey(acc.privateKey, config.password ?? '123456');
214-
// eslint-disable-next-line no-console
215-
console.log(
216-
'system_tests_utils.ts: import for privateKey succeeded ',
217-
acc.privateKey,
218-
);
219-
}
220-
}
195+
await web3Personal.importRawKey(
196+
getSystemTestBackend() === 'geth' ? acc.privateKey.slice(2) : acc.privateKey,
197+
config.password ?? '123456',
198+
);
221199
}
222200

223201
await web3Personal.unlockAccount(acc.address, config.password ?? '123456', 100000000);

0 commit comments

Comments
 (0)