Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
Finished removing AuthServiceProxy; adapted e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspider committed Oct 7, 2020
1 parent 05c2417 commit ba9426d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 257 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ omit =
teos/teosd.py
teos/logger.py
teos/sample_conf.py
teos/utils/auth_proxy.py
5 changes: 2 additions & 3 deletions teos/carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def proxy(self):
)
return bitcoin.rpc.Proxy(service_url)


# NOTCOVERED
def send_transaction(self, rawtx, txid):
"""
Expand Down Expand Up @@ -108,12 +107,12 @@ def send_transaction(self, rawtx, txid):
except VerifyRejectedError as e:
# DISCUSS: 37-transaction-rejection
receipt = Receipt(delivered=False, reason=rpc_errors.RPC_VERIFY_REJECTED)
self.logger.error("Transaction couldn't be broadcasted", error=e)
self.logger.error("Transaction couldn't be broadcasted", error=e.error)

except VerifyError as e:
# DISCUSS: 37-transaction-rejection
receipt = Receipt(delivered=False, reason=rpc_errors.RPC_VERIFY_ERROR)
self.logger.error("Transaction couldn't be broadcasted", error=e)
self.logger.error("Transaction couldn't be broadcasted", error=e.error)

except VerifyAlreadyInChainError as e:
self.logger.info("Transaction is already in the blockchain. Getting confirmation count", txid=txid)
Expand Down
225 changes: 0 additions & 225 deletions teos/utils/auth_proxy.py

This file was deleted.

4 changes: 3 additions & 1 deletion test/teos/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from grpc import RpcError
from multiprocessing import Process

from bitcoin.core import b2x

from teos.teosd import main
from teos.cli.teos_cli import RPCClient
from common.cryptographer import Cryptographer
Expand Down Expand Up @@ -61,6 +63,6 @@ def run_teosd():


def build_appointment_data(commitment_tx_id, penalty_tx):
appointment_data = {"tx": penalty_tx, "tx_id": commitment_tx_id, "to_self_delay": 20}
appointment_data = {"tx": b2x(penalty_tx.serialize()), "tx_id": commitment_tx_id, "to_self_delay": 20}

return appointment_data
Loading

0 comments on commit ba9426d

Please sign in to comment.