Skip to content

Commit 98b8a7e

Browse files
committed
Merge branch 'main' of github.com:rollkit/rollkit into tuan/refactor-store
2 parents 5534fa1 + 92a7df1 commit 98b8a7e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

state/indexer/block/kv/kv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ func (idx *BlockerIndexer) indexEvents(batch ds.Txn, events []abci.Event, typ st
540540
}
541541

542542
// index iff the event specified index:true and it's not a reserved event
543-
compositeKey := fmt.Sprintf("%s.%s", event.Type, string(attr.Key))
543+
compositeKey := event.Type + "." + attr.Key
544544
if compositeKey == types.BlockHeightKey {
545545
return fmt.Errorf("event type and attribute key \"%s\" is reserved; please use a different key", compositeKey)
546546
}

state/txindex/kv/kv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (txi *TxIndex) indexEvents(result *abci.TxResult, hash []byte, store ds.Txn
162162
}
163163

164164
// index if `index: true` is set
165-
compositeTag := fmt.Sprintf("%s.%s", event.Type, string(attr.Key))
165+
compositeTag := event.Type + "." + attr.Key
166166
if attr.GetIndex() {
167167
err := store.Put(txi.ctx, ds.NewKey(keyForEvent(compositeTag, attr.Value, result)), hash)
168168
if err != nil {

0 commit comments

Comments
 (0)