mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
Block nonce as data
This commit is contained in:
parent
93f832a1a7
commit
6e8ff578f1
@ -11,7 +11,7 @@ type BlockRes struct {
|
|||||||
BlockNumber *hexnum `json:"number"`
|
BlockNumber *hexnum `json:"number"`
|
||||||
BlockHash *hexdata `json:"hash"`
|
BlockHash *hexdata `json:"hash"`
|
||||||
ParentHash *hexdata `json:"parentHash"`
|
ParentHash *hexdata `json:"parentHash"`
|
||||||
Nonce *hexnum `json:"nonce"`
|
Nonce *hexdata `json:"nonce"`
|
||||||
Sha3Uncles *hexdata `json:"sha3Uncles"`
|
Sha3Uncles *hexdata `json:"sha3Uncles"`
|
||||||
LogsBloom *hexdata `json:"logsBloom"`
|
LogsBloom *hexdata `json:"logsBloom"`
|
||||||
TransactionRoot *hexdata `json:"transactionRoot"`
|
TransactionRoot *hexdata `json:"transactionRoot"`
|
||||||
@ -41,7 +41,7 @@ func NewBlockRes(block *types.Block, fullTx bool) *BlockRes {
|
|||||||
res.BlockNumber = newHexNum(block.Number())
|
res.BlockNumber = newHexNum(block.Number())
|
||||||
res.BlockHash = newHexData(block.Hash())
|
res.BlockHash = newHexData(block.Hash())
|
||||||
res.ParentHash = newHexData(block.ParentHash())
|
res.ParentHash = newHexData(block.ParentHash())
|
||||||
res.Nonce = newHexNum(block.Header().Nonce)
|
res.Nonce = newHexData(block.Header().Nonce)
|
||||||
res.Sha3Uncles = newHexData(block.Header().UncleHash)
|
res.Sha3Uncles = newHexData(block.Header().UncleHash)
|
||||||
res.LogsBloom = newHexData(block.Bloom())
|
res.LogsBloom = newHexData(block.Bloom())
|
||||||
res.TransactionRoot = newHexData(block.Header().TxHash)
|
res.TransactionRoot = newHexData(block.Header().TxHash)
|
||||||
|
@ -34,7 +34,7 @@ func TestNewBlockRes(t *testing.T) {
|
|||||||
"number": reNum,
|
"number": reNum,
|
||||||
"hash": reHash,
|
"hash": reHash,
|
||||||
"parentHash": reHash,
|
"parentHash": reHash,
|
||||||
"nonce": reNum,
|
"nonce": reData,
|
||||||
"sha3Uncles": reHash,
|
"sha3Uncles": reHash,
|
||||||
"logsBloom": reData,
|
"logsBloom": reData,
|
||||||
"transactionRoot": reHash,
|
"transactionRoot": reHash,
|
||||||
|
Loading…
Reference in New Issue
Block a user