Skip to content

Commit

Permalink
Fix access to evm_version and price_queue
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Aug 20, 2024
1 parent 0e26fb8 commit f789e22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/miner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default class EosEvmMiner {
logger.info("Gas price: " + this.gasPrice);

if (result.rows[0].evm_version != undefined) {
this.evmVersion = parseInt(result.rows[0].evm_version);
this.evmVersion = parseInt(result.rows[0].evm_version.cached_version);
logger.info("EVM version: " + this.evmVersion);
}
else {
Expand All @@ -163,8 +163,8 @@ export default class EosEvmMiner {
show_payer: false
});

if (result.rows.length > 0) {
const price_queue = result.rows.map(x => parseInt(x.price));
if (priceQueueResult.rows.length > 0) {
const price_queue = priceQueueResult.rows.map(x => parseInt(x.price));
this.maxQueuedPrice = Math.max(...price_queue);
}
else {
Expand Down

0 comments on commit f789e22

Please sign in to comment.