示例#1
0
def block_with_txn_with_log(global_test_env):
    env = global_test_env
    node = env.get_rand_node()
    plan = [{"Epoch": 1, "Amount": 1000000}]
    res = env.account.create_restricting_plan(node.web3, COMMON_ADDRESS, plan, env.account.account_with_money['address'], node.eth.gasPrice * 2, 300000)
    platon = Eth(node.web3)
    return platon.getBlock(res['blockNumber'])
示例#2
0
def block_with_txn(global_test_env):
    env = global_test_env
    node = env.get_rand_node()
    account = env.account.account_with_money
    res = env.account.sendTransaction(node.web3, '', account['address'], account['address'], node.eth.gasPrice, 21000, 10000)
    platon = Eth(node.web3)
    return platon.getBlock(res['blockNumber'])