Syncer refactor
This commit is contained in:
@@ -9,18 +9,18 @@ def test_db_role(
|
||||
foo = AccountRole.set('foo', eth_empty_accounts[0])
|
||||
init_database.add(foo)
|
||||
init_database.commit()
|
||||
assert AccountRole.get_address('foo') == eth_empty_accounts[0]
|
||||
assert AccountRole.get_address('foo', init_database) == eth_empty_accounts[0]
|
||||
|
||||
bar = AccountRole.set('bar', eth_empty_accounts[1])
|
||||
init_database.add(bar)
|
||||
init_database.commit()
|
||||
assert AccountRole.get_address('bar') == eth_empty_accounts[1]
|
||||
assert AccountRole.get_address('bar', init_database) == eth_empty_accounts[1]
|
||||
|
||||
foo = AccountRole.set('foo', eth_empty_accounts[2])
|
||||
init_database.add(foo)
|
||||
init_database.commit()
|
||||
assert AccountRole.get_address('foo') == eth_empty_accounts[2]
|
||||
assert AccountRole.get_address('bar') == eth_empty_accounts[1]
|
||||
assert AccountRole.get_address('foo', init_database) == eth_empty_accounts[2]
|
||||
assert AccountRole.get_address('bar', init_database) == eth_empty_accounts[1]
|
||||
|
||||
tag = AccountRole.role_for(eth_empty_accounts[2])
|
||||
assert tag == 'foo'
|
||||
|
||||
@@ -26,7 +26,7 @@ def test_set(
|
||||
'data': '',
|
||||
'chainId': 1,
|
||||
}
|
||||
(tx_hash, tx_signed) = sign_tx(tx_def, 'Foo:1')
|
||||
(tx_hash, tx_signed) = sign_tx(tx_def, 'foo:bar:1')
|
||||
otx = Otx(
|
||||
tx_def['nonce'],
|
||||
tx_def['from'],
|
||||
@@ -82,7 +82,7 @@ def test_clone(
|
||||
'data': '',
|
||||
'chainId': 1,
|
||||
}
|
||||
(tx_hash, tx_signed) = sign_tx(tx_def, 'Foo:1')
|
||||
(tx_hash, tx_signed) = sign_tx(tx_def, 'foo:bar:1')
|
||||
otx = Otx(
|
||||
tx_def['nonce'],
|
||||
tx_def['from'],
|
||||
|
||||
Reference in New Issue
Block a user