diff --git a/itests/test.py b/itests/test.py index 6c7dd747..bdb38e20 100644 --- a/itests/test.py +++ b/itests/test.py @@ -204,7 +204,7 @@ def run(): # Decrypt the decryption key decryption_key = encrypted_decryption_key.get_decryption_key(preimage, iv) - serialized_decryption_key = decryption_key.serialize() + serialized_decryption_key = decryption_key.get_bytes() print("new decryption key: " + str(decryption_key)) print("new decryption key: " + str(serialized_decryption_key)) diff --git a/requirements-itest.txt b/requirements-itest.txt index ef7d02c8..ead1688e 100644 --- a/requirements-itest.txt +++ b/requirements-itest.txt @@ -1,5 +1,5 @@ importlib_resources==1.4.0 -squeaklib +squeaklib==0.3.1 argparse googleapis-common-protos grpcio diff --git a/requirements.txt b/requirements.txt index edfa9d13..8d155053 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ importlib_resources==1.4.0 -squeaklib +squeaklib==0.3.1 argparse googleapis-common-protos grpcio diff --git a/squeakserver/server/postgres_db.py b/squeakserver/server/postgres_db.py index a4f32d10..349c7945 100644 --- a/squeakserver/server/postgres_db.py +++ b/squeakserver/server/postgres_db.py @@ -64,14 +64,14 @@ class PostgresDb(): squeak.hashReplySqk.hex(), squeak.hashBlock.hex(), squeak.nBlockHeight, - bytes(squeak.scriptPubKey), + squeak.vchScriptPubKey, squeak.vchEncryptionKey, squeak.vchEncDatakey.hex(), squeak.vchIv.hex(), squeak.nTime, squeak.nNonce, bytes(squeak.encContent.vchEncContent).hex(), - bytes(squeak.scriptSig), + squeak.vchScriptSig, str(squeak.GetAddress()), squeak.vchDecryptionKey, )) @@ -96,15 +96,15 @@ class PostgresDb(): hashReplySqk=bytes.fromhex(row[4]), hashBlock=bytes.fromhex(row[5]), nBlockHeight=row[6], - scriptPubKey=CScript(row[7].tobytes()), + vchScriptPubKey=row[7], vchEncryptionKey=row[8], vchEncDatakey=bytes.fromhex(row[9]), vchIv=bytes.fromhex((row[10])), nTime=row[11], nNonce=row[12], encContent=CSqueakEncContent(bytes.fromhex((row[13]))), - scriptSig=CScript((row[14].tobytes())), - vchDecryptionKey=(row[16]), + vchScriptSig=row[14], + vchDecryptionKey=row[16], ) return squeak diff --git a/tests/server/conftest.py b/tests/server/conftest.py index 223152b0..41a9b158 100644 --- a/tests/server/conftest.py +++ b/tests/server/conftest.py @@ -46,5 +46,5 @@ def example_squeak(signing_key): @pytest.fixture def bad_squeak(signing_key): squeak = make_squeak(signing_key, 'hello!', ) - squeak.SetDataKey(b'deadbeef') + squeak.ClearDecryptionKey() return squeak