Skip to content

Commit e30bbb0

Browse files
committed
cleanup
1 parent 567b55a commit e30bbb0

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@ lint-fix:
239239
lint-fix-contracts:
240240
solhint --fix contracts/**/*.sol
241241

242+
lint-py:
243+
flake8 --show-source --count --statistics \
244+
--format="::error file=%(path)s,line=%(row)d,col=%(col)d::%(path)s:%(row)d:%(col)d: %(code)s %(text)s" \
245+
tests/integration_tests/
246+
242247
.PHONY: lint lint-fix lint-contracts lint-go lint-python
243248

244249
format: format-go format-python format-shell

tests/integration_tests/network.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
TooManyRedirects,
1919
)
2020
from web3 import AsyncHTTPProvider, AsyncWeb3, HTTPProvider, WebSocketProvider
21-
from web3.middleware import ExtraDataToPOAMiddleware
2221
from web3.providers.rpc.utils import ExceptionRetryConfiguration
2322

2423
from .cosmoscli import CosmosCLI

tests/integration_tests/test_account.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
11
import pytest
22
import web3
3+
from pystarport.utils import w3_wait_for_new_blocks
34

4-
from .utils import derive_new_account
5+
from .utils import (
6+
ADDRS,
7+
KEYS,
8+
assert_duplicate,
9+
derive_new_account,
10+
send_transaction,
11+
)
12+
13+
14+
def test_transaction_count(evm):
15+
w3 = evm.w3
16+
blk = hex(w3.eth.block_number)
17+
name = "community"
18+
sender = ADDRS[name]
19+
receiver = derive_new_account().address
20+
n0 = w3.eth.get_transaction_count(receiver, blk)
21+
# ensure transaction send in new block
22+
w3_wait_for_new_blocks(w3, 1, sleep=0.1)
23+
receipt = send_transaction(
24+
w3,
25+
{
26+
"from": sender,
27+
"to": receiver,
28+
"value": 1000,
29+
},
30+
KEYS[name],
31+
)
32+
assert receipt.status == 1
33+
[n1, n2] = [w3.eth.get_transaction_count(receiver, b) for b in [blk, "latest"]]
34+
assert n0 == n1
35+
assert n0 == n2
36+
assert_duplicate(evm.cosmos_cli().node_rpc_http, receipt.blockNumber)
537

638

739
def test_future_blk(evm):

0 commit comments

Comments
 (0)