Commit 415770b0 authored by Cédric Moreau's avatar Cédric Moreau

[refact] missing word in `getBlockWhereMedianTimeLteAnd`

parent 5c4a0b5b
......@@ -127,8 +127,8 @@ export class DataFinder {
}
@MonitorExecutionTime()
getBlockWhereMedianTimeLteAnd(medianTime: number, previousBlockchainTime: number) {
return this.getFromCacheOrDB('getBlockWhereMedianTimeLteAnd', [medianTime, previousBlockchainTime].join('-'),
getBlockWhereMedianTimeLteAndGt(medianTime: number, previousBlockchainTime: number) {
return this.getFromCacheOrDB('getBlockWhereMedianTimeLteAndGt', [medianTime, previousBlockchainTime].join('-'),
() => this.query('SELECT `issuer`,`membersCount`,`medianTime`,`dividend`,`number`,`nonce` FROM block WHERE `fork`=0 AND `medianTime` <= '+medianTime+' AND `medianTime` > '+previousBlockchainTime+' ORDER BY `medianTime` ASC'))
}
}
......@@ -56,7 +56,7 @@ module.exports = async (req: any, res: any, next: any) => {
}
else if (end > blockchain.length)
{
newBlocks = await dataFinder.getBlockWhereMedianTimeLteAnd(endBlock.medianTime, previousBlockchainTime)
newBlocks = await dataFinder.getBlockWhereMedianTimeLteAndGt(endBlock.medianTime, previousBlockchainTime)
for (let i=0;i<newBlocks.length;i++)
{
......@@ -434,4 +434,4 @@ interface BlockMemberWithPerNode extends BlockMember {
coreCountPerNode: number[]|null
blockCountPerNode: number[]|null
dataPerNode: number[]|null
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment