Published 15 October 2018

PoolTransactionsGet

Getting a set of transactions starting from offset, with the number of blocks being equal to limit, from the block with hash value and index number.

Parameters

Parameters:

1: PoolHash hash

2: i64 index

3: i64 offset

4: i64 limit

Type of result: PoolTransactionsGetResult

Operation algorithm

Operation algorithm:

We download the block with the transmitted hash value to the pool.

If the block is valid, then we retrieve transactions from the pool with offset biasing to the number of limit, save them to the transaction vector in the result structure.

We set the result status equal to SUCCESS.

Data structure

The following structures are used for marshalling purposes:

PoolTransactionsGetResult transaction pool get result

APIResponse status

status

i8 code //status code

string message //status communication

Transactions transactions

set of transactions

Example

Example

/** PoolTransactionsGet begin */

 

PoolHash                               ph2;

PoolTransactionsGetResult   ptg_res;

 

try

{

         api->PoolTransactionsGet(ptg_res, ph2, 0, 0, 10);

}

catch (...)

{

         return 1;

}

 

ptg_res.printTo(std::cout);

std::cout << std::endl << std::endl;

 

/** PoolTransactionsGet end */

16 Useful article

Contents