Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Dec 20, 2022
1 parent 0d1f78e commit d871f37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions process/elasticproc/block/blockProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ func putMiniblocksDetailsInBlock(header coreData.HeaderHandler, block *data.Bloc
func extractExecutionOrderIndicesFromPool(mbHeader coreData.MiniBlockHeaderHandler, txsHashes [][]byte, pool *outport.Pool) []int {
txsMap := getTxsMap(nodeBlock.Type(mbHeader.GetTypeInt32()), pool)
executionOrderTxsIndices := make([]int, len(txsHashes))
indexOfFirstProcessed, indexOfLastProcessed := mbHeader.GetIndexOfFirstTxProcessed(), mbHeader.GetIndexOfLastTxProcessed()
indexOfFirstTxProcessed, indexOfLastTxProcessed := mbHeader.GetIndexOfFirstTxProcessed(), mbHeader.GetIndexOfLastTxProcessed()
for idx, txHash := range txsHashes {
isExecutedInCurrentBlock := int32(idx) >= indexOfFirstProcessed && int32(idx) <= indexOfLastProcessed
isExecutedInCurrentBlock := int32(idx) >= indexOfFirstTxProcessed && int32(idx) <= indexOfLastTxProcessed
if !isExecutedInCurrentBlock {
executionOrderTxsIndices[idx] = notExecutedInCurrentBlock
continue
Expand Down Expand Up @@ -343,7 +343,7 @@ func getTxsMap(mbType nodeBlock.Type, pool *outport.Pool) map[string]coreData.Tr
case nodeBlock.SmartContractResultBlock:
return pool.Scrs
default:
return map[string]coreData.TransactionHandlerWithGasUsedAndFee{}
return make(map[string]coreData.TransactionHandlerWithGasUsedAndFee)
}
}

Expand Down

0 comments on commit d871f37

Please sign in to comment.