@@ -35,10 +35,10 @@ type Block struct {
3535// BlockModel represents a simplified Block structure for Swagger documentation
3636type BlockModel struct {
3737 ChainId string `json:"chain_id"`
38- Number uint64 `json:"number "`
39- Hash string `json:"hash "`
38+ BlockNumber uint64 `json:"block_number "`
39+ BlockHash string `json:"block_hash "`
4040 ParentHash string `json:"parent_hash"`
41- Timestamp uint64 `json:"timestamp "`
41+ BlockTimestamp uint64 `json:"block_timestamp "`
4242 Nonce string `json:"nonce"`
4343 Sha3Uncles string `json:"sha3_uncles"`
4444 MixHash string `json:"mix_hash"`
@@ -76,10 +76,10 @@ type RawBlock = map[string]interface{}
7676func (b * Block ) Serialize () BlockModel {
7777 return BlockModel {
7878 ChainId : b .ChainId .String (),
79- Number : b .Number .Uint64 (),
80- Hash : b .Hash ,
79+ BlockNumber : b .Number .Uint64 (),
80+ BlockHash : b .Hash ,
8181 ParentHash : b .ParentHash ,
82- Timestamp : uint64 (b .Timestamp .Unix ()),
82+ BlockTimestamp : uint64 (b .Timestamp .Unix ()),
8383 Nonce : b .Nonce ,
8484 Sha3Uncles : b .Sha3Uncles ,
8585 MixHash : b .MixHash ,
0 commit comments