From d5ed8a794b85a28588cb09b68c30aa212742e6f8 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 20 Nov 2019 11:34:09 +0400 Subject: [PATCH] types: change number_txs to num_txs json tag in BlockMeta and EventDataNewBlockHeader --- rpc/swagger/swagger.yaml | 6 +++--- types/block_meta.go | 2 +- types/events.go | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rpc/swagger/swagger.yaml b/rpc/swagger/swagger.yaml index 066d62102..c0ebc1725 100644 --- a/rpc/swagger/swagger.yaml +++ b/rpc/swagger/swagger.yaml @@ -1268,14 +1268,14 @@ definitions: BlockMeta: type: object properties: + block_id: + $ref: "#/definitions/BlockId" block_size: type: number x-example: 1000000 - block_id: - $ref: "#/definitions/BlockId" header: $ref: "#/definitions/BlockHeader" - number_txs: + num_txs: type: string example: "54" Blockchain: diff --git a/types/block_meta.go b/types/block_meta.go index 694130bbc..f31c9f3d1 100644 --- a/types/block_meta.go +++ b/types/block_meta.go @@ -5,7 +5,7 @@ type BlockMeta struct { BlockID BlockID `json:"block_id"` BlockSize int `json:"block_size"` Header Header `json:"header"` - NumTxs int `json:"number_txs"` + NumTxs int `json:"num_txs"` } // NewBlockMeta returns a new BlockMeta. diff --git a/types/events.go b/types/events.go index 39b79c90b..c679e7034 100644 --- a/types/events.go +++ b/types/events.go @@ -69,11 +69,10 @@ type EventDataNewBlock struct { ResultEndBlock abci.ResponseEndBlock `json:"result_end_block"` } -// light weight event for benchmarking type EventDataNewBlockHeader struct { Header Header `json:"header"` - NumTxs int64 `json:"number_txs"` // Number of txs in a block + NumTxs int64 `json:"num_txs"` // Number of txs in a block ResultBeginBlock abci.ResponseBeginBlock `json:"result_begin_block"` ResultEndBlock abci.ResponseEndBlock `json:"result_end_block"` }