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

View File

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