You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/lotus-shed/indexes.go
+23-16Lines changed: 23 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,13 @@ import (
24
24
lcli "github.com/filecoin-project/lotus/cli"
25
25
)
26
26
27
+
const (
28
+
// same as in chain/events/index.go
29
+
eventExists=`SELECT MAX(id) FROM event WHERE height=? AND tipset_key=? AND tipset_key_cid=? AND emitter_addr=? AND event_index=? AND message_cid=? AND message_index=?`
30
+
insertEvent=`INSERT OR IGNORE INTO event(height, tipset_key, tipset_key_cid, emitter_addr, event_index, message_cid, message_index, reverted) VALUES(?, ?, ?, ?, ?, ?, ?, ?)`
31
+
insertEntry=`INSERT OR IGNORE INTO event_entry(event_id, indexed, flags, key, codec, value) VALUES(?, ?, ?, ?, ?, ?)`
@@ -173,19 +193,6 @@ var backfillEventsCmd = &cli.Command{
173
193
}
174
194
defertx.Rollback() //nolint:errcheck
175
195
176
-
stmtSelectEvent, err:=tx.Prepare("SELECT MAX(id) from event WHERE height=? AND tipset_key=? and tipset_key_cid=? and emitter_addr=? and event_index=? and message_cid=? and message_index=? and reverted=false")
0 commit comments