0

I send tx with Python SDK send_transaction function.

ctx = Client(RPC_URL, commitment=Commitment("confirmed"))
txn = ctx.send_transaction(tx, *signers)

I want to add to send tx process maxRetries option like with sendTransaction RPC Method Solana API: https://solana.com/docs/rpc/http/sendtransaction

How to make that correctly?

1 Answer 1

1

The param definitely exists on the optional TxOpts that can be passed to send_transaction: https://github.com/michaelhly/solana-py/blob/ff9af6800293b7fda8f542c7da8e5b329e7ec342/src/solana/rpc/types.py#L72

I haven't tested this, but you should be able to do something like:

txn = ctx.send_transaction(tx, *signers, opts=TxOpts(max_retries=10))
1
  • Thank you! I'll try it tomorrow
    – Jahspear
    Commented Apr 21 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.