blocto / solana-go-sdk

Solana Golang SDK
https://blocto.github.io/solana-go-sdk/
MIT License
373 stars 96 forks source link

Transaction timeouts using context #60

Closed scottywm closed 2 years ago

scottywm commented 2 years ago

Hey thanks for answering my questions a couple of days ago.

However now I've got another question.

1) When we actually send the transaction we are putting in the context inside of it so I was wondering if we could put a timeout in this context?

txhash, err := c.SendTransaction(context.Background(), tx)

2) The solana Blockchain network has had some issues in the past as the whole block chain has gone down on a couple of occasions. Thus if the whole solana network was to go down again, how would this affect all the existing transactions that were already occurring at the time?

Thanks

yihau commented 2 years ago
  1. the context is for http request. it don't really affect how a transaction execute in a node. iirc you have asked something similar before.
  2. if network go down, I think no tx can be executed.

FYI: https://solanacookbook.com/guides/retrying-transactions.html#the-journey-of-a-transaction