Skip to content

Commit

Permalink
feat: add memorypool
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jul 6, 2021
1 parent 95dd7d4 commit 83c4c5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion src/RPC/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -235,7 +236,7 @@ export class Network extends RPCBase {
* @returns {Promise<string[]>}
* @memberof Network
*/
public async getRawMempool(): Promise<string[]> {
public async getRawMemPool(): Promise<string[]> {
return this.call('getrawmempool');
}

Expand All @@ -248,4 +249,14 @@ export class Network extends RPCBase {
public async listBanned(): Promise<Banned> {
return this.call('listbanned');
}

/**
* Displays included and excluded memory pool txs
*
* @returns {Promise<MemoryPool>}
* @memberof Network
*/
public async memoryPool(): Promise<MemoryPool> {
return this.call('memorypool');
}
}
6 changes: 3 additions & 3 deletions src/contracts/memoryPool.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface IMemoryPool {
'Excluded Tx': string;
'Included Tx': string;
export interface MemoryPool {
excludedTx: string;
includedTx: string;
}

0 comments on commit 83c4c5a

Please sign in to comment.