Skip to content

Commit

Permalink
Namecoin / AuxPoW: Rename Hash to sha256d due to upstream refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Nov 22, 2018
1 parent cd0774f commit 9416ddc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions electrum/auxpow.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# absolute prior to Python 3.5.
import electrum.blockchain
from .bitcoin import hash_encode, hash_decode
from .crypto import Hash
from .crypto import sha256d
from . import transaction
from .transaction import BCDataStream, Transaction, TYPE_SCRIPT
from .util import bfh, bh2u
Expand Down Expand Up @@ -158,7 +158,7 @@ def calculate_merkle_root(leaf, merkle_branch, index):
data_to_hash = target + hash_decode(merkle_step)
else:
data_to_hash = hash_decode(merkle_step) + target
target = Hash(data_to_hash)
target = sha256d(data_to_hash)
mask = mask >> 1

return hash_encode(target)
Expand Down Expand Up @@ -306,7 +306,7 @@ def hex_to_int(s):
# This is calculated the same as the Transaction.txid() method, but doesn't
# reserialize it.
def fast_txid(tx):
return bh2u(Hash(tx.raw_bytes)[::-1])
return bh2u(sha256d(tx.raw_bytes)[::-1])

# Used by fast_tx_deserialize
def stub_parse_output(vds, i):
Expand Down

0 comments on commit 9416ddc

Please sign in to comment.