Closed pyz4 closed 6 months ago
@pyz4 would you mind taking a look at the broken integration test?
The check issues are from a TypeError in test_send_transaction_and_get_balance
:
# transfer_tx needs to be a VersionedTransaction.
transfer_tx = Transaction().add(
sp.transfer(sp.TransferParams(from_pubkey=stubbed_sender.pubkey(), to_pubkey=stubbed_receiver, lamports=1000))
)
sim_resp = test_http_client.simulate_transaction(transfer_tx)
the test_send_raw_transaction_and_get_balance
test in integration/test_http_client.py
. The returned balance is 9999994000
, but the assertion is against 9999988000
. May be that your change is using less gas?
Same thing in test_send_raw_transaction_and_get_balance_using_latest_blockheight
. Balance is slightly higher than it should be. Would love to get @michaelhly 's opinion on if gas is likely the culprit.
The check issues are from a TypeError in
test_send_transaction_and_get_balance
:# transfer_tx needs to be a VersionedTransaction. transfer_tx = Transaction().add( sp.transfer(sp.TransferParams(from_pubkey=stubbed_sender.pubkey(), to_pubkey=stubbed_receiver, lamports=1000)) ) sim_resp = test_http_client.simulate_transaction(transfer_tx)
the
test_send_raw_transaction_and_get_balance
test inintegration/test_http_client.py
. The returned balance is9999994000
, but the assertion is against9999988000
. May be that your change is using less gas?Same thing in
test_send_raw_transaction_and_get_balance_using_latest_blockheight
. Balance is slightly higher than it should be. Would love to get @michaelhly 's opinion on if gas is likely the culprit.
Yeah. We can change the hard-coded balance amounts but I think we still need to fix the TypeError
:
FAILED tests/integration/test_http_client.py::test_send_transaction_and_get_balance - TypeError: argument 'tx': 'Transaction' object cannot be converted to 'VersionedTransaction'
Incorporate new parameters from RPC API (https://docs.solana.com/api/http#simulatetransaction): replace_recent_blockhash, min_context_slot, and accounts.