Don't use TesterBlockchain.ether_airdrop if it's already funded or can be done in the constructor

pull/899/head
David Núñez 2019-04-09 13:48:39 +02:00
parent 09c0672dd0
commit 01c466554a
5 changed files with 4 additions and 8 deletions

View File

@ -68,7 +68,7 @@ class BlockchainInterface:
compiler: SolidityCompiler = None) -> None:
"""
A blockchain "network inerface"; The circumflex wraps entirely around the bounds of
A blockchain "network interface"; The circumflex wraps entirely around the bounds of
contract operations including compilation, deployment, and execution.
Filesystem Configuration Node Client EVM

View File

@ -39,8 +39,7 @@ def test_rapid_deployment():
interface = BlockchainDeployerInterface(compiler=compiler,
registry=registry,
provider_uri='tester://pyevm')
blockchain = TesterBlockchain(interface=interface, airdrop=False, test_accounts=4)
blockchain.ether_airdrop(amount=TESTING_ETH_AIRDROP_AMOUNT)
blockchain = TesterBlockchain(interface=interface, airdrop=True, test_accounts=4)
origin, *everyone = blockchain.interface.w3.eth.accounts
deployer = Deployer(blockchain=blockchain,

View File

@ -25,7 +25,6 @@ from nucypher.utilities.sandbox.constants import TESTING_ETH_AIRDROP_AMOUNT
@pytest.fixture(scope='module')
def author(testerchain, three_agents):
token_agent, miner_agent, policy_agent = three_agents
token_agent.ether_airdrop(amount=TESTING_ETH_AIRDROP_AMOUNT)
_origin, ursula, alice, *everybody_else = testerchain.interface.w3.eth.accounts
author = PolicyAuthor(checksum_address=alice)
return author

View File

@ -110,8 +110,7 @@ def deployed_blockchain():
#
# Blockchain
#
blockchain = TesterBlockchain(interface=interface, airdrop=False, test_accounts=5, poa=True)
blockchain.ether_airdrop(amount=TESTING_ETH_AIRDROP_AMOUNT)
blockchain = TesterBlockchain(interface=interface, airdrop=True, test_accounts=5, poa=True)
origin, *everyone = blockchain.interface.w3.eth.accounts
#

View File

@ -341,11 +341,10 @@ def testerchain(solidity_compiler):
provider_uri='tester://pyevm')
# Create the blockchain
testerchain = TesterBlockchain(interface=deployer_interface, airdrop=False)
testerchain = TesterBlockchain(interface=deployer_interface, airdrop=True)
origin, *everyone = testerchain.interface.w3.eth.accounts
deployer_interface.deployer_address = origin # Set the deployer address from a freshly created test account
testerchain.ether_airdrop(amount=TESTING_ETH_AIRDROP_AMOUNT)
yield testerchain
testerchain.sever_connection()