-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds --blockhash arg to Close #7456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me! The close
implementation already takes into account the sign_only
field, so this should be the only change needed.
Once you've had a chance to try this locally just to double-check, we can merge it. Thanks for your contribution!
I finally got around to testing this change. I was successfully able to call However, it returned an error, even though the transaction was sent, and the token account was closed... I'm not sure if this is related or not; do you know?
|
#### Problem As noticed with solana-labs#7456, a transaction with a nonced blockhash fails to confirm even though it works. This might be because of the confirmation logic in the RPC client, which looks for the provided blockhash: https://github.com/anza-xyz/agave/blob/b46c87ea538a1508ed4ae36f8dbf6c75dd57c883/rpc-client/src/nonblocking/rpc_client.rs#L1090 #### Summary of changes Specify a default transaction confirmation timeout.
Hm, that typically means that there was an issue confirming the transaction. I wonder if there's a bug in We might need to create the RPC client with timeouts in token-cli, similar to what we're doing in the main CLI. I put in #7484 for that -- let me know what you think! |
Do you want to test again with my PR too? My hunch is that this is good to go either way |
I didn't use a nonce in my testing, just a recent blockhash I got from |
Hm, it would only fail if the transaction got in right before the blockhash expired. Anyway, I've tested this locally and it works without my PR, so let's merge this in |
Actually, I noticed that just passing in |
Go for it! |
Ok cool, let me know how this looks! |
The tests look good to me, thanks! |
#### Problem As noticed with #7456, a transaction with a nonced blockhash fails to confirm even though it works. This might be because of the confirmation logic in the RPC client, which looks for the provided blockhash: https://github.com/anza-xyz/agave/blob/b46c87ea538a1508ed4ae36f8dbf6c75dd57c883/rpc-client/src/nonblocking/rpc_client.rs#L1090 #### Summary of changes Specify a default transaction confirmation timeout.
I'd like the
--blockhash
arg on the Close instruction. This is done by calling.offline_args()
.output from `spl-token close --help`