setDefaultBlock

Sets the default block used as a reference for visionWeb.vs.getBlock, visionWeb.vs.getBlockTransactionCount, visionWeb.vs.getTransactionFromBlock

Usage

visionWeb.setDefaultBlock(block);

Parameters

ParameterDescriptionTypeDefault
blockPossible input values can be 'latest', 'earliest', left blank or block number.latest | earliest | blockNumber-

Returns

latest,earliest,false,undefined

Example

visionWeb.setDefaultBlock('latest');
> 'latest'
visionWeb.setDefaultBlock('earliest');
> 'earliest'
visionWeb.setDefaultBlock();
> false
visionWeb.setDefaultBlock(143281);
> undefined