tendermint / basecoin-examples

DEPRECATED: Example code, showing how you can build your own cryptocurrency on top of basecoin
Apache License 2.0
10 stars 10 forks source link

runtime error: invalid memory address or nil pointer dereference #3

Closed melekes closed 7 years ago

melekes commented 7 years ago

Followed tutorial.md. During the last command, the process has crashed with runtime error: invalid memory address or nil pointer dereference:

root@45d469fa4af4:/go/src/github.com/tendermint/basecoin/data# basecoin sendtx --to 0xD397BC62B435F3CF50570FBAB4340FE52C60858F --from priv_validator2.json --amount 100
Signed SendTx:
{"gas":0,"fee":{"denom":"blank","amount":0},"inputs":[{"address":"4793A333846E5104C46DD9AB9A00E31821B2F301","coins":[{"denom":"blank","amount":100}],"sequence":2,"signature":[1,"3D7EA8A9F6DC1BB879958ABAB64B6BAE2A0BEB46EE9B2024239B150F7D5A81B694C0E3ED17BCC8CF183BE2C757609F73838F745C830B4B0286C8992DB4EA360F"],"pub_key":null}],"outputs":[{"address":"D397BC62B435F3CF50570FBAB4340FE52C60858F","coins":[{"denom":"blank","amount":100}]}]}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x40860f]

goroutine 1 [running]:
panic(0x9ef7a0, 0xc420012070)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
main.broadcastTx(0xc42017edc0, 0xebc680, 0xc420019630, 0x1b3, 0x0, 0x0, 0xc4201f3f40, 0x14)
        /go/src/github.com/tendermint/basecoin/cmd/basecoin/tx.go:152 +0x28f
main.cmdSendTx(0xc42017edc0, 0xc42008b8c8, 0x47c851)
        /go/src/github.com/tendermint/basecoin/cmd/basecoin/tx.go:62 +0x958
main.glob..func2(0xc42017edc0, 0x10100, 0xc42017edc0)
        /go/src/github.com/tendermint/basecoin/cmd/basecoin/cmd.go:31 +0x2b
github.com/tendermint/basecoin/vendor/github.com/urfave/cli.HandleAction(0x9cd400, 0xc14d60, 0xc42017edc0, 0xc42012cc00, 0x0)
        /go/src/github.com/tendermint/basecoin/vendor/github.com/urfave/cli/app.go:485 +0xd4
github.com/tendermint/basecoin/vendor/github.com/urfave/cli.Command.Run(0xa97fed, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xaa6f6a, 0x1b, 0x0, ...)
        /go/src/github.com/tendermint/basecoin/vendor/github.com/urfave/cli/command.go:207 +0xb96
github.com/tendermint/basecoin/vendor/github.com/urfave/cli.(*App).Run(0xc42013aea0, 0xc42000c080, 0x8, 0x8, 0x0, 0x0)
        /go/src/github.com/tendermint/basecoin/vendor/github.com/urfave/cli/app.go:250 +0x812
main.main()
        /go/src/github.com/tendermint/basecoin/cmd/basecoin/main.go:24 +0x2ec

basecoin: 699e0f6ae40a93a74a5d3975c3742c730fc4a034 (develop)

ethanfrey commented 7 years ago

Fixed in 6e3a199