Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: parse version object in block result #892

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions infrastructure/tendermint/httpclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var _ = Describe("HTTPClient", func() {

blockResults, err := client.BlockResults(anyBlockHeight, &Base64BlockResultEventAttributeDecoder{})
Expect(err).To(BeNil())
expected := "{\"height\":367216,\"txsResults\":[{\"code\":0,\"data\":\"\\n\\n\\n\\u0008delegate\",\"log\":[{\"msgIndex\":0,\"events\":[{\"type\":\"delegate\",\"attributes\":[{\"key\":\"validator\",\"value\":\"tcrocncl1pm27djcs5djxjsxw3unrkv3m3jtxdexktw5epu\",\"index\":false},{\"key\":\"amount\",\"value\":\"19302674761\",\"index\":false}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"delegate\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"module\",\"value\":\"staking\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":false}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"amount\",\"value\":\"1913979901basetcro\",\"index\":false}]}]}],\"rawLog\":\"[{\\\"events\\\":[{\\\"type\\\":\\\"delegate\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"validator\\\",\\\"value\\\":\\\"tcrocncl1pm27djcs5djxjsxw3unrkv3m3jtxdexktw5epu\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"19302674761\\\"}]},{\\\"type\\\":\\\"message\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"action\\\",\\\"value\\\":\\\"delegate\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"module\\\",\\\"value\\\":\\\"staking\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\\\"}]},{\\\"type\\\":\\\"transfer\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"recipient\\\",\\\"value\\\":\\\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"1913979901basetcro\\\"}]}]}]\",\"info\":\"\",\"gasWanted\":\"200000\",\"gasUsed\":\"143179\",\"events\":[{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro17xpfvakm2amg962yls6f84z3kell8c5lxhzaha\",\"index\":true},{\"key\":\"sender\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":true},{\"key\":\"amount\",\"value\":\"20000basetcro\",\"index\":true}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":true}]}],\"codespace\":\"\"},{\"code\":0,\"data\":\"\\n\\n\\n\\u0008delegate\",\"log\":[{\"msgIndex\":0,\"events\":[{\"type\":\"delegate\",\"attributes\":[{\"key\":\"validator\",\"value\":\"tcrocncl10gsqs8jzdlrem80shp0x6wx0jw7qu7m8cd29y5\",\"index\":false},{\"key\":\"amount\",\"value\":\"17338013566\",\"index\":false}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"delegate\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"module\",\"value\":\"staking\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":false}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"amount\",\"value\":\"2310941249basetcro\",\"index\":false}]}]}],\"rawLog\":\"[{\\\"events\\\":[{\\\"type\\\":\\\"delegate\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"validator\\\",\\\"value\\\":\\\"tcrocncl10gsqs8jzdlrem80shp0x6wx0jw7qu7m8cd29y5\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"17338013566\\\"}]},{\\\"type\\\":\\\"message\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"action\\\",\\\"value\\\":\\\"delegate\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"module\\\",\\\"value\\\":\\\"staking\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\\\"}]},{\\\"type\\\":\\\"transfer\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"recipient\\\",\\\"value\\\":\\\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"2310941249basetcro\\\"}]}]}]\",\"info\":\"\",\"gasWanted\":\"200000\",\"gasUsed\":\"143737\",\"events\":[{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro17xpfvakm2amg962yls6f84z3kell8c5lxhzaha\",\"index\":true},{\"key\":\"sender\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":true},{\"key\":\"amount\",\"value\":\"20000basetcro\",\"index\":true}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":true}]}],\"codespace\":\"\"}],\"beginBlockEvents\":[{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro17xpfvakm2amg962yls6f84z3kell8c5lxhzaha\",\"index\":true},{\"key\":\"sender\",\"value\":\"tcro1m3h30wlvsf8llruxtpukdvsy0km2kum87lx9mq\",\"index\":true},{\"key\":\"amount\",\"value\":\"17449528321basetcro\",\"index\":true}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"tcro1m3h30wlvsf8llruxtpukdvsy0km2kum87lx9mq\",\"index\":true}]},{\"type\":\"mint\",\"attributes\":[{\"key\":\"bonded_ratio\",\"value\":\"0.000809196054376644\",\"index\":true},{\"key\":\"inflation\",\"value\":\"0.013755821936855184\",\"index\":true},{\"key\":\"annual_provisions\",\"value\":\"110133046994204576.138016526579386288\",\"index\":true},{\"key\":\"amount\",\"value\":\"17449528321\",\"index\":true}]}],\"endBlockEvents\":[{\"type\":\"commission\",\"attributes\":[{\"key\":\"amount\",\"value\":\"87247841.605000000000000000basetcro\",\"index\":true},{\"key\":\"validator\",\"value\":\"tcrocncl18p07yvmphymscz6tl4a7zmh93g0k6vy72ww4s4\",\"index\":true}]},{\"type\":\"rewards\",\"attributes\":[{\"key\":\"amount\",\"value\":\"872478416.050000000000000000basetcro\",\"index\":true},{\"key\":\"validator\",\"value\":\"tcrocncl18p07yvmphymscz6tl4a7zmh93g0k6vy72ww4s4\",\"index\":true}]}],\"validatorUpdates\":[{\"pubkey\":{\"type\":\"tendermint.crypto.PublicKey_Ed25519\",\"pubkey\":\"SE5zeTjcYPXVrfcOva61QWokSZFfQu2h316fR6bB2dY=\"},\"address\":\"CA721C3A05F500838DDD1B16F4E2D2D09E463218\",\"power\":138525202},{\"pubkey\":{\"type\":\"tendermint.crypto.PublicKey_Ed25519\",\"pubkey\":\"Epmo3U6yXlxSDQzWZ8yBPOMHw2R85lc26RK98Rlo0oM=\"},\"address\":\"E067FCE33F7FDBD0CE4872F8E240A7AD6E654726\",\"power\":112904113}],\"consensusParamUpdates\":{\"block\":{\"maxBytes\":\"22020096\",\"maxGas\":\"-1\"},\"evidence\":{\"maxAgeNumBlocks\":\"100000\",\"maxAgeDuration\":\"172800000000000\",\"maxBytes\":\"\"},\"validator\":{\"pubKeyTypes\":[\"ed25519\"]}}}"
expected := "{\"height\":367216,\"txsResults\":[{\"code\":0,\"data\":\"\\n\\n\\n\\u0008delegate\",\"log\":[{\"msgIndex\":0,\"events\":[{\"type\":\"delegate\",\"attributes\":[{\"key\":\"validator\",\"value\":\"tcrocncl1pm27djcs5djxjsxw3unrkv3m3jtxdexktw5epu\",\"index\":false},{\"key\":\"amount\",\"value\":\"19302674761\",\"index\":false}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"delegate\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"module\",\"value\":\"staking\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":false}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"amount\",\"value\":\"1913979901basetcro\",\"index\":false}]}]}],\"rawLog\":\"[{\\\"events\\\":[{\\\"type\\\":\\\"delegate\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"validator\\\",\\\"value\\\":\\\"tcrocncl1pm27djcs5djxjsxw3unrkv3m3jtxdexktw5epu\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"19302674761\\\"}]},{\\\"type\\\":\\\"message\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"action\\\",\\\"value\\\":\\\"delegate\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"module\\\",\\\"value\\\":\\\"staking\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\\\"}]},{\\\"type\\\":\\\"transfer\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"recipient\\\",\\\"value\\\":\\\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"1913979901basetcro\\\"}]}]}]\",\"info\":\"\",\"gasWanted\":\"200000\",\"gasUsed\":\"143179\",\"events\":[{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro17xpfvakm2amg962yls6f84z3kell8c5lxhzaha\",\"index\":true},{\"key\":\"sender\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":true},{\"key\":\"amount\",\"value\":\"20000basetcro\",\"index\":true}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"tcro1pm27djcs5djxjsxw3unrkv3m3jtxdexk73hqel\",\"index\":true}]}],\"codespace\":\"\"},{\"code\":0,\"data\":\"\\n\\n\\n\\u0008delegate\",\"log\":[{\"msgIndex\":0,\"events\":[{\"type\":\"delegate\",\"attributes\":[{\"key\":\"validator\",\"value\":\"tcrocncl10gsqs8jzdlrem80shp0x6wx0jw7qu7m8cd29y5\",\"index\":false},{\"key\":\"amount\",\"value\":\"17338013566\",\"index\":false}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"delegate\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"module\",\"value\":\"staking\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":false}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":false},{\"key\":\"sender\",\"value\":\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\",\"index\":false},{\"key\":\"amount\",\"value\":\"2310941249basetcro\",\"index\":false}]}]}],\"rawLog\":\"[{\\\"events\\\":[{\\\"type\\\":\\\"delegate\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"validator\\\",\\\"value\\\":\\\"tcrocncl10gsqs8jzdlrem80shp0x6wx0jw7qu7m8cd29y5\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"17338013566\\\"}]},{\\\"type\\\":\\\"message\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"action\\\",\\\"value\\\":\\\"delegate\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"module\\\",\\\"value\\\":\\\"staking\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\\\"}]},{\\\"type\\\":\\\"transfer\\\",\\\"attributes\\\":[{\\\"key\\\":\\\"recipient\\\",\\\"value\\\":\\\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\\\"},{\\\"key\\\":\\\"sender\\\",\\\"value\\\":\\\"tcro1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8339p4l\\\"},{\\\"key\\\":\\\"amount\\\",\\\"value\\\":\\\"2310941249basetcro\\\"}]}]}]\",\"info\":\"\",\"gasWanted\":\"200000\",\"gasUsed\":\"143737\",\"events\":[{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro17xpfvakm2amg962yls6f84z3kell8c5lxhzaha\",\"index\":true},{\"key\":\"sender\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":true},{\"key\":\"amount\",\"value\":\"20000basetcro\",\"index\":true}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"tcro10gsqs8jzdlrem80shp0x6wx0jw7qu7m8djfuuh\",\"index\":true}]}],\"codespace\":\"\"}],\"beginBlockEvents\":[{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcro17xpfvakm2amg962yls6f84z3kell8c5lxhzaha\",\"index\":true},{\"key\":\"sender\",\"value\":\"tcro1m3h30wlvsf8llruxtpukdvsy0km2kum87lx9mq\",\"index\":true},{\"key\":\"amount\",\"value\":\"17449528321basetcro\",\"index\":true}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"tcro1m3h30wlvsf8llruxtpukdvsy0km2kum87lx9mq\",\"index\":true}]},{\"type\":\"mint\",\"attributes\":[{\"key\":\"bonded_ratio\",\"value\":\"0.000809196054376644\",\"index\":true},{\"key\":\"inflation\",\"value\":\"0.013755821936855184\",\"index\":true},{\"key\":\"annual_provisions\",\"value\":\"110133046994204576.138016526579386288\",\"index\":true},{\"key\":\"amount\",\"value\":\"17449528321\",\"index\":true}]}],\"endBlockEvents\":[{\"type\":\"commission\",\"attributes\":[{\"key\":\"amount\",\"value\":\"87247841.605000000000000000basetcro\",\"index\":true},{\"key\":\"validator\",\"value\":\"tcrocncl18p07yvmphymscz6tl4a7zmh93g0k6vy72ww4s4\",\"index\":true}]},{\"type\":\"rewards\",\"attributes\":[{\"key\":\"amount\",\"value\":\"872478416.050000000000000000basetcro\",\"index\":true},{\"key\":\"validator\",\"value\":\"tcrocncl18p07yvmphymscz6tl4a7zmh93g0k6vy72ww4s4\",\"index\":true}]}],\"validatorUpdates\":[{\"pubkey\":{\"type\":\"tendermint.crypto.PublicKey_Ed25519\",\"pubkey\":\"SE5zeTjcYPXVrfcOva61QWokSZFfQu2h316fR6bB2dY=\"},\"address\":\"CA721C3A05F500838DDD1B16F4E2D2D09E463218\",\"power\":138525202},{\"pubkey\":{\"type\":\"tendermint.crypto.PublicKey_Ed25519\",\"pubkey\":\"Epmo3U6yXlxSDQzWZ8yBPOMHw2R85lc26RK98Rlo0oM=\"},\"address\":\"E067FCE33F7FDBD0CE4872F8E240A7AD6E654726\",\"power\":112904113}],\"consensusParamUpdates\":{\"block\":{\"maxBytes\":\"22020096\",\"maxGas\":\"-1\"},\"evidence\":{\"maxAgeNumBlocks\":\"100000\",\"maxAgeDuration\":\"172800000000000\",\"maxBytes\":\"\"},\"validator\":{\"pubKeyTypes\":[\"ed25519\"]},\"version\":{\"appVersion\":\"\"}}}"
Expect(jsoniter.MarshalToString(blockResults)).To(Equal(expected))
})

Expand All @@ -116,7 +116,7 @@ var _ = Describe("HTTPClient", func() {

blockResults, err := client.BlockResults(anyBlockHeight, &Base64BlockResultEventAttributeDecoder{})
Expect(err).To(BeNil())
Expect(jsoniter.MarshalToString(blockResults)).To(Equal("{\"height\":4794,\"txsResults\":[],\"beginBlockEvents\":[],\"endBlockEvents\":[],\"validatorUpdates\":[{\"pubkey\":{\"type\":\"tendermint.crypto.PublicKey_Ed25519\",\"pubkey\":\"CpCz+c19SHaNWW31P+7blzyHo0sQMn4uk8gIej+pXW8=\"},\"address\":\"02D50170AFB2B3718477AA607469BEA96C80CE88\",\"power\":null}],\"consensusParamUpdates\":{\"block\":{\"maxBytes\":\"22020096\",\"maxGas\":\"-1\"},\"evidence\":{\"maxAgeNumBlocks\":\"100000\",\"maxAgeDuration\":\"172800000000000\",\"maxBytes\":\"\"},\"validator\":{\"pubKeyTypes\":[\"ed25519\"]}}}"))
Expect(jsoniter.MarshalToString(blockResults)).To(Equal("{\"height\":4794,\"txsResults\":[],\"beginBlockEvents\":[],\"endBlockEvents\":[],\"validatorUpdates\":[{\"pubkey\":{\"type\":\"tendermint.crypto.PublicKey_Ed25519\",\"pubkey\":\"CpCz+c19SHaNWW31P+7blzyHo0sQMn4uk8gIej+pXW8=\"},\"address\":\"02D50170AFB2B3718477AA607469BEA96C80CE88\",\"power\":null}],\"consensusParamUpdates\":{\"block\":{\"maxBytes\":\"22020096\",\"maxGas\":\"-1\"},\"evidence\":{\"maxAgeNumBlocks\":\"100000\",\"maxAgeDuration\":\"172800000000000\",\"maxBytes\":\"\"},\"validator\":{\"pubKeyTypes\":[\"ed25519\"]},\"version\":{\"appVersion\":\"\"}}}"))
})
})

Expand Down
3 changes: 3 additions & 0 deletions infrastructure/tendermint/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,8 @@ func parseBlockResultsConsensusParamsUpdates(rawUpdates RawBlockResultsConsensus
Validator: model.BlockResultsConsensusParamsUpdatesValidator{
PubKeyTypes: validatorPubKeyTypes,
},
Version: model.BlockResultsConsensusParamsUpdatesVersion{
AppVersion: rawUpdates.Version.AppVersion,
},
}
}
3 changes: 3 additions & 0 deletions infrastructure/tendermint/rawblockresults.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ type RawBlockResultsConsensusParamUpdates struct {
Validator struct {
PubKeyTypes []string `json:"pub_key_types"`
} `json:"validator"`
Version struct {
AppVersion string `json:"app_version"`
} `json:"version"`
}
5 changes: 5 additions & 0 deletions usecase/model/blockresults.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type BlockResultsConsensusParamUpdates struct {
Block BlockResultsConsensusParamUpdatesBlock `json:"block"`
Evidence BlockResultsConsensusParamUpdatesEvidence `json:"evidence"`
Validator BlockResultsConsensusParamsUpdatesValidator `json:"validator"`
Version BlockResultsConsensusParamsUpdatesVersion `json:"version"`
}

type BlockResultsConsensusParamUpdatesBlock struct {
Expand All @@ -78,3 +79,7 @@ type BlockResultsConsensusParamUpdatesEvidence struct {
type BlockResultsConsensusParamsUpdatesValidator struct {
PubKeyTypes []string `json:"pubKeyTypes"`
}

type BlockResultsConsensusParamsUpdatesVersion struct {
AppVersion string `json:"appVersion"`
}
Loading