@pytest.mark.integration
def test_send_transaction_prefetched_blockhash(stubbed_sender_prefetched_blockhash, stubbed_receiver_prefetched_blockhash, test_http_client):
    'Test sending a transaction to localnet.'
    transfer_tx = Transaction().add(sp.transfer(sp.TransferParams(from_pubkey=stubbed_sender_prefetched_blockhash.public_key, to_pubkey=stubbed_receiver_prefetched_blockhash, lamports=1000)))
    recent_blockhash = test_http_client.parse_recent_blockhash(test_http_client.get_recent_blockhash(Finalized))
    resp = test_http_client.send_transaction(transfer_tx, stubbed_sender_prefetched_blockhash, recent_blockhash=recent_blockhash)
    assert_valid_response(resp)
    test_http_client.confirm_transaction(resp['result'])
    resp = test_http_client.get_balance(stubbed_sender_prefetched_blockhash.public_key)
    assert_valid_response(resp)
    assert (resp['result']['value'] == 9999994000)
    resp = test_http_client.get_balance(stubbed_receiver_prefetched_blockhash)
    assert_valid_response(resp)
    assert (resp['result']['value'] == 954)
Test sending a transaction to localnet.
@pytest.mark.integration
def test_send_transaction_prefetched_blockhash(stubbed_sender_prefetched_blockhash, stubbed_receiver_prefetched_blockhash, test_http_client):
    
    transfer_tx = Transaction().add(sp.transfer(sp.TransferParams(from_pubkey=stubbed_sender_prefetched_blockhash.public_key, to_pubkey=stubbed_receiver_prefetched_blockhash, lamports=1000)))
    recent_blockhash = test_http_client.parse_recent_blockhash(test_http_client.get_recent_blockhash(Finalized))
    resp = test_http_client.send_transaction(transfer_tx, stubbed_sender_prefetched_blockhash, recent_blockhash=recent_blockhash)
    assert_valid_response(resp)
    test_http_client.confirm_transaction(resp['result'])
    resp = test_http_client.get_balance(stubbed_sender_prefetched_blockhash.public_key)
    assert_valid_response(resp)
    assert (resp['result']['value'] == 9999994000)
    resp = test_http_client.get_balance(stubbed_receiver_prefetched_blockhash)
    assert_valid_response(resp)
    assert (resp['result']['value'] == 954)