lian / bitcoin-ruby

bitcoin utils and protocol in ruby.
Other
922 stars 322 forks source link

Improve behavior of `Bitcoin::Protocol::Txout#to_hash with_address:` option #262

Closed Yuki-Inoue closed 6 years ago

Yuki-Inoue commented 6 years ago

Currently, Bitcoin::Protocol::Txout#to_hash with_address: option outputs address only if destination is p2pkh.

This pr fixes it so that if result address is unique, then the address is returned.

lian commented 6 years ago

cherry picked into master