Skip to content

Commit

Permalink
Merge pull request #56 from eosnetworkfoundation/elmato/fix-reading-e…
Browse files Browse the repository at this point in the history
…vm-version

[1.0] Fix access to evm_version and price_queue
  • Loading branch information
yarkinwho authored Aug 21, 2024
2 parents 0e26fb8 + f789e22 commit 97dbae3
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 97dbae3

Please sign in to comment.