Add setting to disable database use.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import projectedBlocks from './mempool-blocks';
|
||||
import { DB } from '../database';
|
||||
|
||||
class FeeApi {
|
||||
constructor() { }
|
||||
@@ -28,20 +27,6 @@ class FeeApi {
|
||||
'hourFee': thirdMedianFee,
|
||||
};
|
||||
}
|
||||
|
||||
public async $getTransactionsForBlock(blockHeight: number): Promise<any[]> {
|
||||
try {
|
||||
const connection = await DB.pool.getConnection();
|
||||
const query = `SELECT feePerVsize AS fpv FROM transactions WHERE blockheight = ? ORDER BY feePerVsize ASC`;
|
||||
const [rows] = await connection.query<any>(query, [blockHeight]);
|
||||
connection.release();
|
||||
return rows;
|
||||
} catch (e) {
|
||||
console.log('$getTransactionsForBlock() error', e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new FeeApi();
|
||||
|
||||
Reference in New Issue
Block a user