clean up imports; don't use pybitcoin in unit tests

This commit is contained in:
Jude Nelson
2017-04-27 19:26:51 -04:00
parent 2198780889
commit d183b8afc0

View File

@@ -321,9 +321,9 @@ if __name__ == "__main__":
Unit tests.
"""
import pybitcoin
import json
import virtualchain
from virtualchain.lib.hashing import *
# hack around absolute paths
current_dir = os.path.abspath(os.path.join( os.path.dirname(__file__), "..") )
sys.path.insert(0, current_dir)
@@ -331,7 +331,9 @@ if __name__ == "__main__":
from storage import serialize_mutable_data, parse_mutable_data
from user import make_mutable_data_info
pk = pybitcoin.BitcoinPrivateKey()
import keylib
pk = keylib.ECPrivateKey()
data_privkey = pk.to_hex()
data_pubkey = pk.public_key().to_hex()
@@ -343,7 +345,7 @@ if __name__ == "__main__":
]
def hash_data( d ):
return pybitcoin.hash.hex_hash160( d )
return hex_hash160( d )
rc = storage_init()
if not rc: