Skip to content

Commit

Permalink
feat: use 0x-prefix hex string represent block assembler args
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsoledad committed Apr 11, 2019
1 parent 9244c11 commit 171e08e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/ckb/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def genesis_block
end

def genesis_block_hash
@genesis_block_hash ||= get_block_hash(0)
@genesis_block_hash ||= get_block_hash('0')
end

def get_block_hash(block_number)
Expand Down
6 changes: 3 additions & 3 deletions lib/ckb/wallet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ def lock

def block_assembler_config
args = lock[:args].map do |arg|
"[#{arg.bytes.map(&:to_s).join(", ")}]"
end.join(", ")
"0x#{arg}"
end
%Q(
[block_assembler]
binary_hash = "#{lock[:binary_hash]}"
args = [#{args}]
args = #{args}
).strip
end

Expand Down

0 comments on commit 171e08e

Please sign in to comment.