Skip to content

Commit

Permalink
fix: fix witnesses_root
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed May 10, 2019
1 parent 74d3f45 commit fb26eac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/ckb/types/block_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module CKB
module Types
class BlockHeader
attr_reader :difficulty, :hash, :number, :parent_hash, :seal, :timestamp, :transactions_root, :proposals_hash, \
:uncles_count, :uncles_hash, :version, :witness_root, :epoch
:uncles_count, :uncles_hash, :version, :witnesses_root, :epoch

# @param difficulty [String] 0x...
# @param hash [String] 0x...
Expand All @@ -17,7 +17,7 @@ class BlockHeader
# @param uncles_count [Integer] number
# @param uncles_hash [String] 0x...
# @param version [Integer]
# @param witness_root [String] 0x...
# @param witnesses_root [String] 0x...
# @param epoch [String] number
def initialize(
difficulty:,
Expand All @@ -31,7 +31,7 @@ def initialize(
uncles_count:,
uncles_hash:,
version:,
witness_root:,
witnesses_root:,
epoch:
)
@difficulty = difficulty
Expand All @@ -45,7 +45,7 @@ def initialize(
@uncles_count = uncles_count.to_i
@uncles_hash = uncles_hash
@version = version
@witness_root = witness_root
@witnesses_root = witnesses_root
@epoch = epoch
end

Expand All @@ -62,7 +62,7 @@ def to_h
uncles_count: @uncles_count.to_i,
uncles_hash: @uncles_hash,
version: @version,
witness_root: @witness_root,
witnesses_root: @witnesses_root,
epoch: @epoch
}
end
Expand All @@ -82,7 +82,7 @@ def self.from_h(hash)
uncles_count: hash[:uncles_count],
uncles_hash: hash[:uncles_hash],
version: hash[:version],
witness_root: hash[:witnesses_root],
witnesses_root: hash[:witnesses_root],
epoch: hash[:epoch]
)
end
Expand Down

0 comments on commit fb26eac

Please sign in to comment.