gendump: fix errcheck warning

scripts/gendump/main.go:95:13: Error return value of `rand.Read` is not checked (errcheck)
                        rand.Read(key)
                                 ^
scripts/gendump/main.go:96:13: Error return value of `rand.Read` is not checked (errcheck)
                        rand.Read(value)
                                 ^
This commit is contained in:
Roman Khimov 2021-05-12 20:18:11 +03:00
parent 4caff35e73
commit f1f30fd0c5

View file

@ -92,8 +92,10 @@ func main() {
txs := make([]*transaction.Transaction, txNum)
for j := 0; j < txNum; j++ {
nonce++
rand.Read(key)
rand.Read(value)
_, err = rand.Read(key)
handleError("can't get random data for key", err)
_, err = rand.Read(value)
handleError("can't get random data for value", err)
w := io.NewBufBinWriter()
emit.AppCall(w.BinWriter, contractHash, "put", callflag.All, key, value)