Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"dependencies": {
"@types/express": "^4.16.1",
"demux": "5.0.2-533",
"demux": "5.0.2-572",
"massive": "5.11.0"
},
"peerDependencies": {
"demux": "5.0.2-533"
"demux": "5.0.2-572"
},
"scripts": {
"build": "tsc && cp -R src/cyanaudit dist",
Expand Down
4 changes: 2 additions & 2 deletions src/MassiveActionHandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ describe('TestMassiveActionHandler', () => {
it('returns a needToSeek block number if state already exists', async () => {
const nextBlock = await actionReader.getNextBlock()
await actionHandler.handleBlock(nextBlock, false)
expect(actionReader.currentBlockNumber).toBe(1)
expect(actionReader._currentBlockNumber).toBe(1)

const nextBlock2 = await actionReader.getNextBlock()
await actionHandler.handleBlock(nextBlock2, false)
expect(actionReader.currentBlockNumber).not.toBe(1)
expect(actionReader._currentBlockNumber).not.toBe(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t this be a function call?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it's a getter method, so you access it like a property.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah reading helps 👍


actionHandler.reset()
const nextBlockNeeded = await actionHandler.handleBlock(nextBlock, false)
Expand Down
4 changes: 4 additions & 0 deletions src/testHelpers/JsonActionReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export class JsonActionReader extends AbstractActionReader {
super({startAtBlock, onlyIrreversible})
}

public get _currentBlockNumber(): number {
return this.currentBlockNumber
}

public async getHeadBlockNumber(): Promise<number> {
const block = this.blockchain.slice(-1)[0]
const { blockInfo: { blockNumber } } = block
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1239,10 +1239,10 @@ delegates@^1.0.0:
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=

[email protected]533:
version "5.0.2-533"
resolved "https://registry.yarnpkg.com/demux/-/demux-5.0.2-533.tgz#181c997eef688b30b17e09e45d6114d4863a8e2e"
integrity sha512-FnPE7rlVmYePOrAAtrBR2NUZ0bPu75SrPBgKdeckBnvA6XmMelVYuH+LArv15Bo5Df7DZb9YVePwH3gjriGcyQ==
[email protected]572:
version "5.0.2-572"
resolved "https://registry.yarnpkg.com/demux/-/demux-5.0.2-572.tgz#03248cbb255da67b6d60c6ce0560584ce1efda0a"
integrity sha512-5TN92DasjUWacED+OqaT9fDUvHPQ0jVu4OeWawUq1DRcLOJpCVtU+9UeTcNtMAkHqCmqA6Pd+PyuULzCoinJZQ==
dependencies:
bunyan "1.8.12"
express "4.16.4"
Expand Down