abci: Port EventAttribute field type change to main (#9335)

* types: Refactor EventAttribute (#6408)

Cherry-pick of 09a6ad7b1e

* Ensure context is honored

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Replace with tagged switch

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Ensure contexts are honored

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add UPGRADING note about type change

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unnecessary conversion

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
Thane Thomson
2022-08-30 10:13:55 -04:00
committed by GitHub
co-authored by Aleksandr Bezobchuk
parent 2313f35800
commit 7b40167f58
17 changed files with 156 additions and 143 deletions
+4 -4
View File
@@ -176,12 +176,12 @@ func (app *Application) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock
Type: "val_updates",
Attributes: []abci.EventAttribute{
{
Key: []byte("size"),
Value: []byte(strconv.Itoa(valUpdates.Len())),
Key: "size",
Value: strconv.Itoa(valUpdates.Len()),
},
{
Key: []byte("height"),
Value: []byte(strconv.Itoa(int(req.Height))),
Key: "height",
Value: strconv.Itoa(int(req.Height)),
},
},
},