mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
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)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue