From 83c4c5a43bcfde4febb37b33e31180bf0044e48f Mon Sep 17 00:00:00 2001 From: Grid Cat Date: Tue, 6 Jul 2021 09:41:55 +0200 Subject: [PATCH] feat: add memorypool --- src/RPC/Network.ts | 13 ++++++++++++- src/contracts/memoryPool.ts | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/RPC/Network.ts b/src/RPC/Network.ts index e9944c2..358d6e8 100644 --- a/src/RPC/Network.ts +++ b/src/RPC/Network.ts @@ -5,6 +5,7 @@ import { BurnReport } from '../contracts/burnReport'; import { Checkpoint } from '../contracts/checkpoint'; import { CurrentTime } from '../contracts/currentTime'; import { Info } from '../contracts/info'; +import { MemoryPool } from '../contracts/memoryPool'; import { NetTotals } from '../contracts/netTotals'; import { NetworkInfo } from '../contracts/networkInfo'; import { Peer } from '../contracts/peer'; @@ -235,7 +236,7 @@ export class Network extends RPCBase { * @returns {Promise} * @memberof Network */ - public async getRawMempool(): Promise { + public async getRawMemPool(): Promise { return this.call('getrawmempool'); } @@ -248,4 +249,14 @@ export class Network extends RPCBase { public async listBanned(): Promise { return this.call('listbanned'); } + + /** + * Displays included and excluded memory pool txs + * + * @returns {Promise} + * @memberof Network + */ + public async memoryPool(): Promise { + return this.call('memorypool'); + } } diff --git a/src/contracts/memoryPool.ts b/src/contracts/memoryPool.ts index 63917c3..c47e24b 100644 --- a/src/contracts/memoryPool.ts +++ b/src/contracts/memoryPool.ts @@ -1,4 +1,4 @@ -export interface IMemoryPool { - 'Excluded Tx': string; - 'Included Tx': string; +export interface MemoryPool { + excludedTx: string; + includedTx: string; }