Skip to content

Commit

Permalink
test: chain.get_transaction on mainnet with unknown tx's
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Nov 21, 2020
1 parent 27f80e8 commit 0c90744
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/network/state/test_get_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@ def test_not_in_history(accounts, chain, history):
def test_unknown_tx(accounts, chain, history):
with pytest.raises(TransactionNotFound):
chain.get_transaction("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")


def test_external_tx(network, chain):
network.connect("mainnet")

tx = chain.get_transaction("0x1e0e3df9daa09d009185a1d009b905a9264e296f2d9c8cf6e8a2d0723df249a3")
assert tx.status == 1


def test_external_tx_reverted(network, chain):
network.connect("mainnet")

tx = chain.get_transaction("0x7c913d12a7692889c364913b7909806de05692abc9312b718f16f444e4a6b94b")
assert tx.status == 0

0 comments on commit 0c90744

Please sign in to comment.