美文网首页
以太坊C++源码解析(九)区块头

以太坊C++源码解析(九)区块头

作者: sky2016 | 来源:发表于2019-03-19 14:26 被阅读0次

区块头定义位于libethcore\BlockHeader.h文件中,是一个非常简单的类,我们来看看它包含哪些重要数据:

  • h256 m_parentHash
    父区块的hash值,区块与区块之间的连接点
  • h256 m_sha3Uncles
    叔区块的hash
  • h256 m_stateRoot
    区块状态树根的hash
  • h256 m_transactionsRoot
    区块内交易树根的hash
  • h256 m_receiptsRoot
    区块内交易收据树根的hash
  • int64_t m_number
    区块高度
  • u256 m_gasLimit
    区块中交易的gas总数的上限,由挖矿者设定
  • u256 m_gasUsed
    区块中所有交易所用的gas总和,不能超过m_gasLimit
  • Address m_author
    挖矿者的地址
  • u256 m_difficulty
    挖矿难度

关于Merkle Patricia Trie的说明详见:明明白白以太坊Merkle Patricia Trie

相关文章

网友评论

      本文标题:以太坊C++源码解析(九)区块头

      本文链接:https://www.haomeiwen.com/subject/gtbgmqtx.html