Module: lib/blockchains/fennel/listener

Module to connect to the Fennel parachain and crawl/listen for transactions

Source:
To Do:
  • Improve performance

Methods

(inner) executeBlockIteration(immediateopt)

Executes block retrieval iteration and re-schedules itself when completed

Parameters:
Name Type Attributes Default Description
immediate boolean <optional>
false

proces next block batch immediately

Source:

(inner) initListener(fnlConfig, fnlState, fnlApiopt) → {Promise}

Initiates the listener for Fennel blockchain transactions

Parameters:
Name Type Attributes Description
fnlConfig Object

the Fennel blockchain configuration

fnlState Object

the Fennel blockchain state

fnlApi Object <optional>

the Fennel API

Source:
Returns:

resolve if succesfully initialised

Type
Promise

(inner) scanBlocks(cursor, endBlock, wfMessagesopt) → {Promise}

Scans a block for Whiteflag messages, and triggers to scan next block

Parameters:
Name Type Attributes Description
cursor number

the block to scan

endBlock number

the last block to scan block

wfMessages Array.<wfMessages> <optional>

Whiteflag messages processed in an earlier block

Source:
Returns:

resolves if all blocks are successfully processed

Type
Promise