0chain / gosdk

A client SDK in Go to interface the blockchain and storage platform, and other smart contracts
MIT License
32 stars 29 forks source link

Variable overwrite #336

Open lpoli opened 2 years ago

lpoli commented 2 years ago

https://github.com/0chain/gosdk/blame/staging/zcncore/transaction.go#L796 https://github.com/0chain/gosdk/blame/staging/zcncore/transaction.go#L516 https://github.com/0chain/gosdk/blame/staging/zcncore/transaction.go#L680

Above overwriting seems erroneous. numSharders argument is passed but it is overwritten in suspicious manner.

lpoli commented 2 years ago

@cnlangzi Can you please check if this is issue that needs to be resolved?

cnlangzi commented 2 years ago

@lpoli We had a lot of discussion about it. I would suggest to leave it first. Because it is used by too much code. it is great if you have enough time to improve and test them