feat: introduce getRecentPerformanceSamples rpc (#12442)

* feat: introduce getRecentPerformanceSamples rpc

* test: indroduce tests and clean up style

* test: skip live tests

* feat: run tests live
This commit is contained in:
Josh
2020-10-08 20:26:58 -07:00
committed by GitHub
parent 6972e63f51
commit e0eb374d9c
4 changed files with 131 additions and 0 deletions

8
web3.js/module.d.ts vendored
View File

@ -155,6 +155,13 @@ declare module '@solana/web3.js' {
}>;
};
export type PerfSample = {
slot: number;
numTransactions: number;
numSlots: number;
samplePeriodSecs: number;
};
export type ConfirmedTransaction = {
slot: number;
transaction: Transaction;
@ -421,6 +428,7 @@ declare module '@solana/web3.js' {
getRecentBlockhashAndContext(
commitment?: Commitment,
): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>;
getRecentPerformanceSamples(limit?: number): Promise<Array<PerfSample>>;
getFeeCalculatorForBlockhash(
blockhash: Blockhash,
commitment?: Commitment,