Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Commit

Permalink
revert changes related to lastChunk processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
crchemist-ip committed Oct 18, 2019
1 parent bd4e7c7 commit 617474f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/entities/elastic-storage/block-data.js
Expand Up @@ -15,7 +15,7 @@ class BlockData extends ElasticData {

storedUTxOs: Array<UtxoType>

allUtxos: {string: UtxoType}
allUtxos: { [string]: UtxoType }

inputsData: [] = []

Expand Down
4 changes: 2 additions & 2 deletions src/entities/elastic-storage/elastic-storage-processor.js
Expand Up @@ -262,7 +262,7 @@ class ElasticStorageProcessor implements StorageProcessor {
async storeGenesisUtxos(utxos: Array<UtxoType>) {
// TODO: check bulk upload response
this.logger.debug('storeGenesisUtxos: store utxos to "txio" index and create fake txs in "tx" index')
const chunk = this.lastChunk + 1
const chunk = ++this.lastChunk

const utxosObjs = utxos.map((utxo) => new UtxoData(utxo))
const txioBody = formatBulkUploadBody(utxosObjs, {
Expand Down Expand Up @@ -331,7 +331,7 @@ class ElasticStorageProcessor implements StorageProcessor {
const utxosToStore = []
const txInputsIds = []
const blockTxs = []
const chunk = this.lastChunk + 1
const chunk = ++this.lastChunk
for (const block of blocks) {
const txs = block.getTxs()
if (txs.length > 0) {
Expand Down

0 comments on commit 617474f

Please sign in to comment.