Published 15 October 2018


Getting the content of blocks starting from the offset block, with the number of blocks being equal to limit.



1: i64 offset

2: i64 limit

Type of result: PoolListGetResult

Operation algorithm

Operation algorithm:

We set a limit on the values of offset and limit parameters equal to 100.

We allocate space to the pool of return result in the amount of limit.

We retrieve the last block’s hash value on the blockchain as the current hash and the number of blocks on the blockchain.

In respect of all blocks starting from the offset block, with the number of blocks being equal to limit, we perform the following actions in reverse order:

We search for a block with the current hash value in the pool cache.

If the current block is located at the end of the pool cache, then we:

Download that block and convert it to the API pool format.

If the block falls within the range of blocks to be returned, then we add it to the result pool.

Add the hash value and pool to the pool cache.

Retrieve the previous block's hash value.

Or else we add the current block being viewed to the result and set a hash value equal to the previous block's hash value.

Data structure

The following structures are used for marshalling purposes:

PoolListGetResult    transaction pool list get result

APIResponse status


i8 code //status code

string message //status communication

bool result

result success boolean flag

Pools pools

set of pools



/** PoolListGet begin */


PoolListGetResult plg_res;




         api->PoolListGet(plg_res, 0, 10);


catch (...)


         return 1;




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


/** PoolListGet end */

14 Useful article