Class: Ciri::Chain::Header

Inherits:
Object
  • Object
show all
Includes:
RLP::Serializable
Defined in:
lib/ciri/chain/header.rb

Overview

block header

Constant Summary

Constants included from RLP::Serializable

RLP::Serializable::TYPES

Instance Attribute Summary

Attributes included from RLP::Serializable

#serializable_attributes

Instance Method Summary collapse

Methods included from RLP::Serializable

#==, included, #initialize, #initialize_copy, #rlp_encode

Instance Method Details

#get_hashObject

header hash



46
47
48
# File 'lib/ciri/chain/header.rb', line 46

def get_hash
  Utils.keccak(rlp_encode)
end

#mining_hashObject

mining_hash, used for mining



51
52
53
# File 'lib/ciri/chain/header.rb', line 51

def mining_hash
  Utils.keccak(rlp_encode skip_keys: [:mix_hash, :nonce])
end