Published 15 February 2019

PoolListGetResult PoolListGet(1:i64 offset, 2:i64 limit) // deprecated

Description

 

Description

For web monitor, used now. Get metainfo about pools skipping `offset` up to `limit` in amount

Restrict the values ​​of the parameters “offset” and “limit” to 100.

Allocate space for the return result pool in the size of “limit”.
Retrieve the hash of the last blockchain block as the current hash and the number of blocks in the blockchain.
For all blocks, starting from the block “offset”, in the number of “limit” blocks, in the reverse order:
Look for a block with the current hash in the cache pool.
If the current block is at the end of the pool cache, then:
Load this block and convert it to the API pool format.
If the block is in the range of blocks required for return, then add it to the result pool.
Add the hash and pool to the pool cache.
Get of the hash of the previous block.
Otherwise, add the current block to the result and set the hash equal to the hash of the previous block

Return

Return

struct PoolListGetResult

{

   1: general.APIResponse status

   2: bool result

   3: i32 count

   4: list<Pool> pools

}

Description of the returned structures and typedefs

Description of the returned structures and typedefs

struct APIResponse

{

// 0 for success, 1 for failure, 2 for not being implemented (currently unused)

   1: i8 code

// Explanation

   2: string message

}

Votes 0, average rating 0

Contents