Browse Source

types: change number_txs to num_txs json tag in BlockMeta

and EventDataNewBlockHeader
pull/4186/head
Anton Kaliaev 5 years ago
parent
commit
d5ed8a794b
3 changed files with 5 additions and 6 deletions
  1. +3
    -3
      rpc/swagger/swagger.yaml
  2. +1
    -1
      types/block_meta.go
  3. +1
    -2
      types/events.go

+ 3
- 3
rpc/swagger/swagger.yaml View File

@ -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:


+ 1
- 1
types/block_meta.go View File

@ -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.


+ 1
- 2
types/events.go View File

@ -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"`
}


Loading…
Cancel
Save