lib/bitcoin/key.rb in bitcoin-ruby-0.0.10 vs lib/bitcoin/key.rb in bitcoin-ruby-0.0.11
- old
+ new
@@ -67,16 +67,18 @@
return nil unless @key.public_key
@pubkey_compressed ? pub_compressed : pub_uncompressed
end
def pub_compressed
- @key.public_key.group.point_conversion_form = :compressed
- @key.public_key.to_hex.rjust(66, '0')
+ public_key = @key.public_key
+ public_key.group.point_conversion_form = :compressed
+ public_key.to_hex.rjust(66, '0')
end
def pub_uncompressed
- @key.public_key.group.point_conversion_form = :uncompressed
- @key.public_key.to_hex.rjust(130, '0')
+ public_key = @key.public_key
+ public_key.group.point_conversion_form = :uncompressed
+ public_key.to_hex.rjust(130, '0')
end
def compressed
@pubkey_compressed
end