Skip to content

Commit

Permalink
Merge branch 'master' of github.com:celenium-io/celestia-indexer into…
Browse files Browse the repository at this point in the history
… new-events
  • Loading branch information
vvuwei committed Oct 31, 2023
2 parents 20c7791 + 5bfcdcc commit c59d7fc
Show file tree
Hide file tree
Showing 23 changed files with 17 additions and 32 deletions.
2 changes: 1 addition & 1 deletion internal/storage/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Block struct {
VersionBlock uint64 `bun:"version_block" comment:"Block version"`
VersionApp uint64 `bun:"version_app" comment:"App version"`

MessageTypes types.MsgTypeBits `bun:"message_types,type:bit(73)" comment:"Bit mask with containing messages"`
MessageTypes types.MsgTypeBits `bun:"message_types,type:bit(74)" comment:"Bit mask with containing messages"`

Hash pkgTypes.Hex `bun:"hash" comment:"Block hash"`
ParentHash pkgTypes.Hex `bun:"parent_hash" comment:"Hash of parent block"`
Expand Down
1 change: 0 additions & 1 deletion internal/storage/mock/address.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/balance.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/block.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/block_stats.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/constant.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/denom_metadata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/event.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/generic.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/message.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/namespace.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/stats.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/tx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/storage/mock/validator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/storage/postgres/scopes.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func txFilter(query *bun.SelectQuery, fltrs storage.TxFilter) *bun.SelectQuery {
query = sortScope(query, "id", fltrs.Sort)

if !fltrs.MessageTypes.Empty() {
query = query.Where("bit_count(message_types & ?::bit(73)) > 0", fltrs.MessageTypes)
query = query.Where("bit_count(message_types & ?::bit(74)) > 0", fltrs.MessageTypes)
}

if len(fltrs.Status) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Tx struct {
Codespace string `bun:"codespace,type:text" comment:"Codespace" stats:"filterable"`
Hash []byte `bun:"hash" comment:"Transaction hash"`
Memo string `bun:"memo,type:text" comment:"Note or comment to send with the transaction"`
MessageTypes types.MsgTypeBits `bun:"message_types,type:bit(73)" comment:"Bit mask with containing messages" stats:"filterable"`
MessageTypes types.MsgTypeBits `bun:"message_types,type:bit(74)" comment:"Bit mask with containing messages" stats:"filterable"`

Messages []Message `bun:"rel:has-many,join:id=tx_id"`
Events []Event `bun:"rel:has-many"`
Expand Down
4 changes: 2 additions & 2 deletions internal/storage/types/msg_type_bitmask.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ var _ driver.Valuer = (*MsgTypeBits)(nil)

func (mask MsgTypeBits) Value() (driver.Value, error) {
if mask.value == nil {
return fmt.Sprintf("%073b", 0), nil
return fmt.Sprintf("%074b", 0), nil
}
return fmt.Sprintf("%073b", mask.value), nil
return fmt.Sprintf("%074b", mask.value), nil
}
1 change: 0 additions & 1 deletion pkg/node/mock/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/data/block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
last_results_hash: 0xE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
evidence_hash: 0xE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
proposer_address: 0x81A24EE534DEFE1557A4C7C437E8E8FBC2F834E8
message_types: "0000000000000000000000000000000000000000000000000000000000000000101000100"
message_types: "00000000000000000000000000000000000000000000000000000000000000000101000100"
- id: 1
height: 999
hash: 0x5F7A8DDFE6136FE76B65B9066D4F816D707F28C05B3362D66084664C5B39BA98
Expand All @@ -31,4 +31,4 @@
last_results_hash: 0xE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
evidence_hash: 0xE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
proposer_address: 0x81A24EE534DEFE1557A4C7C437E8E8FBC2F834E8
message_types: "0000000000000000000000000000000000000000000000000000000000000000000000000"
message_types: "00000000000000000000000000000000000000000000000000000000000000000000000000"
6 changes: 3 additions & 3 deletions test/data/rollback/block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
last_results_hash: 0x3330C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B333
evidence_hash: 0x3330C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B333
proposer_address: 0x33324EE534DEFE1557A4C7C437E8E8FBC2F83333
message_types: "0000000000000000000000000000000000000000000000000000000000000000001000100"
message_types: "00000000000000000000000000000000000000000000000000000000000000000001000100"

- id: 2
height: 1000
Expand All @@ -32,7 +32,7 @@
last_results_hash: 0xE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
evidence_hash: 0xE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
proposer_address: 0x81A24EE534DEFE1557A4C7C437E8E8FBC2F834E8
message_types: "0000000000000000000000000000000000000000000000000000000000000000101000100"
message_types: "00000000000000000000000000000000000000000000000000000000000000000101000100"

- id: 1
height: 999
Expand All @@ -50,4 +50,4 @@
last_results_hash: 0x1110C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B111
evidence_hash: 0x1110C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B111
proposer_address: 0x11124EE534DEFE1557A4C7C437E8E8FBC2F83111
message_types: "0000000000000000000000000000000000000000000000000000000000000000000000000"
message_types: "00000000000000000000000000000000000000000000000000000000000000000000000000"
6 changes: 3 additions & 3 deletions test/data/rollback/tx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
status: success
codespace: sdk
memo: memo
message_types: "0000000000000000000000000000000000000000000000000000000000000000001000100"
message_types: "00000000000000000000000000000000000000000000000000000000000000000001000100"
- id: 2
hash: 0x652452A670011D629CC116E510BA88C1CABE061336661B1F3D206D248BD55811
height: 1000
Expand All @@ -27,7 +27,7 @@
status: success
codespace:
memo: memo2
message_types: "0000000000000000000000000000000000000000000000000000000000000000100000000"
message_types: "00000000000000000000000000000000000000000000000000000000000000000100000000"
- id: 3
hash: 0xBA37478C3E9A804697271ACC474D484E9160899C86E551D737EEA819FCC75003
height: 999
Expand All @@ -42,4 +42,4 @@
status: success
codespace:
memo:
message_types: "0000000000000000000000000000000000000000000000000000000000000000000100000"
message_types: "00000000000000000000000000000000000000000000000000000000000000000000100000"
8 changes: 4 additions & 4 deletions test/data/tx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
status: success
codespace: sdk
memo: memo
message_types: "0000000000000000000000000000000000000000000000000000000000000000001000100"
message_types: "00000000000000000000000000000000000000000000000000000000000000000001000100"

- id: 2
hash: 0x652452A670011D629CC116E510BA88C1CABE061336661B1F3D206D248BD55811
Expand All @@ -28,7 +28,7 @@
status: success
codespace:
memo: memo2
message_types: "0000000000000000000000000000000000000000000000000000000000000100000000000"
message_types: "00000000000000000000000000000000000000000000000000000000000000100000000000"

- id: 3
hash: 0xBA37478C3E9A804697271ACC474D484E9160899C86E551D737EEA819FCC75003
Expand All @@ -44,7 +44,7 @@
status: success
codespace:
memo:
message_types: "0000000000000000000000000000000000000000000000000000000000000000000100000"
message_types: "00000000000000000000000000000000000000000000000000000000000000000000100000"

- id: 4
hash:
Expand All @@ -60,4 +60,4 @@
status: success
codespace:
memo: 34499b1ac473fbb03894c883178ecc83f0d6eaf6@64.227.18.169:26656
message_types: "0000000000000000000000000000000000000000000000000000000000000000000100000"
message_types: "00000000000000000000000000000000000000000000000000000000000000000000100000"

0 comments on commit c59d7fc

Please sign in to comment.