Skip to content

Commit

Permalink
fix patch failing PR check, add check-patches npm script
Browse files Browse the repository at this point in the history
  • Loading branch information
chrypnotoad committed Aug 6, 2024
1 parent d2e2e31 commit 0b548d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
23 changes: 13 additions & 10 deletions local_tests.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
diff --git forkSrcPrefix/src/config.ts forkDstPrefix/src/config.ts
index 8b1e6e2e2362e91b7ea955d64c287a6e61f51c48..66202ad5a7f555695c9e7cb04db7a86b0455d4a7 100644
--- forkSrcPrefix/src/config.ts
+++ forkDstPrefix/src/config.ts
@@ -100,7 +100,8 @@ export const CONFIG: Config = {
diff --git a/src/config.ts b/src/config.ts
index db6061c4..712ab94f 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -134,10 +134,10 @@ export const CONFIG: Config = {
generateTxTimestamp: true,
nodelistRefreshInterval: 5000,
nodelistRefreshInterval: 30000,
defaultRequestRetry: 5,
- gasEstimateMethod: 'validator',
+ staticGasEstimate: '0x2DC6C0',
+ gasEstimateMethod: 'replayEngine',
- gasEstimateMethod: 'serviceValidator', //serviceValidator or replayEngine or validator
+ gasEstimateMethod: 'replayEngine', //serviceValidator or replayEngine or validator
gasEstimateInvalidationIntervalInMs: 1000 * 60 * 60 * 2, // 2 hours
gasEstimateUseCache: true,
gasEstimateUseCache: false,
- staticGasEstimate: '0x5B8D80', // comment out rather than delete this line
+ staticGasEstimate: '0x2DC6C0', // comment out rather than delete this line
defaultRequestTimeout: {
default: 2000,
contract: 7000,
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"lint": "eslint \"./src/**/*.ts\"",
"update-docker-dev": "docker build -t registry.gitlab.com/shardeum/json-rpc-server:dev . --push",
"format-check": "prettier --check './src/**/*.ts'",
"format-fix": "prettier --write './src/**/*.ts'"
"format-fix": "prettier --write './src/**/*.ts'",
"check-patches": "node -e \"const { execSync } = require('child_process'); const patches = require('fs').readdirSync('.').filter(f => f.endsWith('.patch')); if (patches.length > 0) { let allPassed = true; patches.forEach(patch => { try { execSync('git apply --verbose --check ' + patch, { stdio: 'inherit' }); console.log('✔ ' + patch + ' can be applied successfully.'); } catch { console.error('✘ ' + patch + ' failed to apply.'); allPassed = false; } }); if (!allPassed) process.exit(1); } else { console.log('No patch files found.'); }\""
},
"author": "thantsintoe",
"license": "ISC",
Expand Down

0 comments on commit 0b548d4

Please sign in to comment.