Skip to content

Commit

Permalink
fix: fix cell exception
Browse files Browse the repository at this point in the history
  • Loading branch information
xxuejie committed May 8, 2019
1 parent 4301074 commit df5a81d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ckb/types/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def signature_hex(key)
blake2b = CKB::Blake2b.new
inputs.each do |input|
previous_output = input.previous_output
blake2b.update(Utils.hex_to_bin(previous_output.tx_hash))
blake2b.update(previous_output.index.to_s)
blake2b.update(Utils.hex_to_bin(previous_output.cell.tx_hash))
blake2b.update(previous_output.cell.index.to_s)
end
outputs.each do |output|
blake2b.update(output.capacity.to_s)
Expand Down

0 comments on commit df5a81d

Please sign in to comment.