Skip to content

Commit

Permalink
fixup! Unit tests: test_bitcoin: FTC
Browse files Browse the repository at this point in the history
  • Loading branch information
lclc committed Mar 23, 2018
1 parent 3d7dc48 commit b49f205
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/tests/test_bitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ def sign_message_with_wif_privkey(wif_privkey, msg):
return key.sign_message(msg, compressed)

sig1 = sign_message_with_wif_privkey(
'N5acUJ3Bpizm13gSq8jV5CwZUgfrjs53RuBASsT9AtuwjAgetARW', msg1)
addr1 = '6iRgFB4Fi922TqJHD7KaFn8Y1DJRHNy9BL'
'Q7a3yVcJ161XRNc21bsDBE9sCmW6pFy7J7mySNEhugfvG7rm1khy', msg1)
addr1 = '6ibhYNEmExkwHk3dvEs4hgRfB1D314JDam'
sig2 = sign_message_with_wif_privkey(
'5mBCYSLtLsBez8Dtr83svFzHU1buS7WA6rYGHBfNPFacPfYWwuT', msg2)
addr2 = '6u7jGyiAQje3RAhBiwZ3pDMKkYCRXuLu76'
'QCtnLHF3qBN86MMT5rerWXoAsbyX69Ugc7Hqji4m19hkW431TkZk', msg2)
addr2 = '6qZT4TjEqz9GqpJVuqNMuKxxeHLnQJECr9'

sig1_b64 = base64.b64encode(sig1)
sig2_b64 = base64.b64encode(sig2)

self.assertEqual(sig1_b64, b'H/9jMOnj4MFbH3d7t4yCQ9i7DgZU/VZ278w3+ySv2F4yIsdqjsc5ng3kmN8OZAThgyfCZOQxZCWza9V5XzlVY0Y=')
self.assertEqual(sig2_b64, b'G84dmJ8TKIDKMT9qBRhpX2sNmR0y5t+POcYnFFJCs66lJmAs3T8A6Sbpx7KA6yTQ9djQMabwQXRrDomOkIKGn18=')
self.assertEqual(sig1_b64, b'IJfBfgRZosTw53PR9qeVUd18hwQL6EvJRN75i39RUQKIdewOZu8aDPAdsYWr19g4MolX5VFTSfy12gXbTRwpbmc=')
self.assertEqual(sig2_b64, b'IIZsygcU6/rC/4jiiHabrJ7bDure+wX/XKzZ5vlBoo8oAWQksB57ReI5lVV6nNU9dclBebP3x6Dk4FPHJsTIk80=')

self.assertTrue(verify_message(addr1, sig1, msg1))
self.assertTrue(verify_message(addr2, sig2, msg2))
Expand Down Expand Up @@ -272,22 +272,22 @@ def test_is_bip32_derivation(self):
class Test_keyImport(unittest.TestCase):

priv_pub_addr = (
{'priv': 'N77oHMwqXeMvcq4N7PGBiuD1QJBjHD2L2sRRNmmYyJWWaPhLzuQn',
'pub': '023a081e220b983d8418899c354defdd644575581913dad327aa205d129fb3f519',
'address': '6oLWMBechqxE98A7opVvPe1HkTaxCkANip',
{'priv': 'Q7a3yVcJ161XRNc21bsDBE9sCmW6pFy7J7mySNEhugfvG7rm1khy',
'pub': '0318b5c02b90c2da97d4c34ebf0fa43628840cf04958e9a814661c5c57f275b394',
'address': '6ibhYNEmExkwHk3dvEs4hgRfB1D314JDam',
'minikey' : False,
'txin_type': 'p2pkh',
'compressed': True,
'addr_encoding': 'base58',
'scripthash': 'b961469efb2ada5cafd2b2911e4341f7f263b917bf6fbf446ca80eca1558f35b'},
{'priv': '5mtucV3Ey9rVFBhSqpLJ3ZYHjXJP2kgMNXaEiAC6Mo2PaqgN3t9',
'pub': '04d4febb2ae001a037360ebb6d202614769e39a3bcb36e3d87f031a35b06effe81729e92d18aded783ecee9ca315231614e067a8540b7197de0555265145be1d03',
'address': '6sgmAodqVZrFACLBBsxx67f33Ze8KDJrJd',
'scripthash': 'b20ca23704bd6efd82cd74faad0d88dae871d27356e21e16284b041b25778607'},
{'priv': '6FvsbjCLg1Y4sbyHnWNiaReeafjiFm4Z5nNwYRiBRWAEUtcW84V',
'pub': '0400082a7e5ce5fc175bdea64798388402d14e39e58d77c80b6ebd49e7329ccd1afcd014dc46ba893a3f5034605c5eef88aefe1b40dfeea2cb13f70fa9770270ac',
'address': '6mEdK8i3R8tuHXN8e7V4KXtECNaSWek4qZ',
'minikey': False,
'txin_type': 'p2pkh',
'compressed': False,
'addr_encoding': 'base58',
'scripthash': '322092a15881322cc38db6b5c0a354a7bfbbb2fe26c414d3903b0da7f5a1756c'},
'scripthash': '040cff7afeb3b2f71c165625d8da4dcfbf07501f402e9b6e78fd174021be0a8b'},
# TODO
# {'priv': 'LHJnnvRzsdrTX2j5QeWVsaBkabK7gfMNqNNqxnbBVRaJYfk24iJz',
# 'pub': '0279ad237ca0d812fb503ab86f25e15ebd5fa5dd95c193639a8a738dcd1acbad81',
Expand Down

0 comments on commit b49f205

Please sign in to comment.