mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-23 11:27:38 +08:00
clean up imports; don't use pybitcoin in unit tests
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user