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:
parent
4caff35e73
commit
f1f30fd0c5
1 changed files with 4 additions and 2 deletions
|
@ -92,8 +92,10 @@ func main() {
|
||||||
txs := make([]*transaction.Transaction, txNum)
|
txs := make([]*transaction.Transaction, txNum)
|
||||||
for j := 0; j < txNum; j++ {
|
for j := 0; j < txNum; j++ {
|
||||||
nonce++
|
nonce++
|
||||||
rand.Read(key)
|
_, err = rand.Read(key)
|
||||||
rand.Read(value)
|
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()
|
w := io.NewBufBinWriter()
|
||||||
emit.AppCall(w.BinWriter, contractHash, "put", callflag.All, key, value)
|
emit.AppCall(w.BinWriter, contractHash, "put", callflag.All, key, value)
|
||||||
|
|
Loading…
Reference in a new issue