@@ -76,7 +76,7 @@ func (index *blockIndex) getLastBlockIndexed() (uint64, error) {
76
76
}
77
77
78
78
func (index * blockIndex ) indexBlock (blockIdxInfo * blockIdxInfo ) error {
79
- // do not index anyting
79
+ // do not index anything
80
80
if len (index .indexItemsMap ) == 0 {
81
81
logger .Debug ("Not indexing block... as nothing to index" )
82
82
return nil
@@ -100,7 +100,7 @@ func (index *blockIndex) indexBlock(blockIdxInfo *blockIdxInfo) error {
100
100
batch .Put (constructBlockNumKey (blockIdxInfo .blockNum ), flpBytes )
101
101
}
102
102
103
- //Index3 Used to find a transactin by it's transaction id
103
+ //Index3 Used to find a transaction by it's transaction id
104
104
if _ , ok := index .indexItemsMap [blkstorage .IndexableAttrTxID ]; ok {
105
105
for _ , txoffset := range txOffsets {
106
106
txFlp := newFileLocationPointer (flp .fileSuffixNum , flp .offset , txoffset .loc )
@@ -217,10 +217,6 @@ func constructBlockNumTranNumKey(blockNum uint64, txNum uint64) []byte {
217
217
return append ([]byte {blockNumTranNumIdxKeyPrefix }, key ... )
218
218
}
219
219
220
- func constructTxID (blockNum uint64 , txNum int ) string {
221
- return fmt .Sprintf ("%d:%d" , blockNum , txNum )
222
- }
223
-
224
220
func encodeBlockNum (blockNum uint64 ) []byte {
225
221
return proto .EncodeVarint (blockNum )
226
222
}
@@ -246,9 +242,9 @@ type fileLocPointer struct {
246
242
locPointer
247
243
}
248
244
249
- func newFileLocationPointer (fileSuffixNum int , begginingOffset int , relativeLP * locPointer ) * fileLocPointer {
245
+ func newFileLocationPointer (fileSuffixNum int , beginningOffset int , relativeLP * locPointer ) * fileLocPointer {
250
246
flp := & fileLocPointer {fileSuffixNum : fileSuffixNum }
251
- flp .offset = begginingOffset + relativeLP .offset
247
+ flp .offset = beginningOffset + relativeLP .offset
252
248
flp .bytesLength = relativeLP .bytesLength
253
249
return flp
254
250
}
0 commit comments