Skip to content

Instantly share code, notes, and snippets.

@wakiyamap
Last active April 5, 2020 20:51
Show Gist options
  • Save wakiyamap/edf1a0e7eb4bde2dbc415fa9cc31d345 to your computer and use it in GitHub Desktop.
Save wakiyamap/edf1a0e7eb4bde2dbc415fa9cc31d345 to your computer and use it in GitHub Desktop.
$ ./goclean.sh
++ type -p gometalinter.v2
+ '[' '!' -x /home/wakiyamap/go/bin/gometalinter.v2 ']'
++ go list ./...
+ linter_targets='github.com/monasuite/monad
github.com/monasuite/monad/addrmgr
github.com/monasuite/monad/blockchain
github.com/monasuite/monad/blockchain/fullblocktests
github.com/monasuite/monad/blockchain/indexers
github.com/monasuite/monad/btcec
github.com/monasuite/monad/btcjson
github.com/monasuite/monad/chaincfg
github.com/monasuite/monad/chaincfg/chainhash
github.com/monasuite/monad/checkpoint
github.com/monasuite/monad/cmd/addblock
github.com/monasuite/monad/cmd/findcheckpoint
github.com/monasuite/monad/cmd/gencerts
github.com/monasuite/monad/cmd/monactl
github.com/monasuite/monad/connmgr
github.com/monasuite/monad/database
github.com/monasuite/monad/database/cmd/dbtool
github.com/monasuite/monad/database/ffldb
github.com/monasuite/monad/database/internal/treap
github.com/monasuite/monad/integration
github.com/monasuite/monad/integration/rpctest
github.com/monasuite/monad/limits
github.com/monasuite/monad/mempool
github.com/monasuite/monad/mining
github.com/monasuite/monad/mining/cpuminer
github.com/monasuite/monad/netsync
github.com/monasuite/monad/peer
github.com/monasuite/monad/rpcclient
github.com/monasuite/monad/rpcclient/examples/bitcoincorehttp
github.com/monasuite/monad/rpcclient/examples/btcdwebsockets
github.com/monasuite/monad/rpcclient/examples/btcwalletwebsockets
github.com/monasuite/monad/txscript
github.com/monasuite/monad/wire'
++ grep -v 'ALL_CAPS\|OP_'
++ gometalinter.v2 -j 4 --disable-all --enable=gofmt --enable=golint --enable=vet --enable=gosimple --enable=unconvert --deadline=10m github.com/monasuite/monad github.com/monasuite/monad/addrmgr github.com/monasuite/monad/blockchain github.com/monasuite/monad/blockchain/fullblocktests github.com/monasuite/monad/blockchain/indexers github.com/monasuite/monad/btcec github.com/monasuite/monad/btcjson github.com/monasuite/monad/chaincfg github.com/monasuite/monad/chaincfg/chainhash github.com/monasuite/monad/checkpoint github.com/monasuite/monad/cmd/addblock github.com/monasuite/monad/cmd/findcheckpoint github.com/monasuite/monad/cmd/gencerts github.com/monasuite/monad/cmd/monactl github.com/monasuite/monad/connmgr github.com/monasuite/monad/database github.com/monasuite/monad/database/cmd/dbtool github.com/monasuite/monad/database/ffldb github.com/monasuite/monad/database/internal/treap github.com/monasuite/monad/integration github.com/monasuite/monad/integration/rpctest github.com/monasuite/monad/limits github.com/monasuite/monad/mempool github.com/monasuite/monad/mining github.com/monasuite/monad/mining/cpuminer github.com/monasuite/monad/netsync github.com/monasuite/monad/peer github.com/monasuite/monad/rpcclient github.com/monasuite/monad/rpcclient/examples/bitcoincorehttp github.com/monasuite/monad/rpcclient/examples/btcdwebsockets github.com/monasuite/monad/rpcclient/examples/btcwalletwebsockets github.com/monasuite/monad/txscript github.com/monasuite/monad/wire
++ tee /dev/stderr
+ test -z ''
+ GO111MODULE=on
+ go test -tags=rpctest github.com/monasuite/monad github.com/monasuite/monad/addrmgr github.com/monasuite/monad/blockchain github.com/monasuite/monad/blockchain/fullblocktests github.com/monasuite/monad/blockchain/indexers github.com/monasuite/monad/btcec github.com/monasuite/monad/btcjson github.com/monasuite/monad/chaincfg github.com/monasuite/monad/chaincfg/chainhash github.com/monasuite/monad/checkpoint github.com/monasuite/monad/cmd/addblock github.com/monasuite/monad/cmd/findcheckpoint github.com/monasuite/monad/cmd/gencerts github.com/monasuite/monad/cmd/monactl github.com/monasuite/monad/connmgr github.com/monasuite/monad/database github.com/monasuite/monad/database/cmd/dbtool github.com/monasuite/monad/database/ffldb github.com/monasuite/monad/database/internal/treap github.com/monasuite/monad/integration github.com/monasuite/monad/integration/rpctest github.com/monasuite/monad/limits github.com/monasuite/monad/mempool github.com/monasuite/monad/mining github.com/monasuite/monad/mining/cpuminer github.com/monasuite/monad/netsync github.com/monasuite/monad/peer github.com/monasuite/monad/rpcclient github.com/monasuite/monad/rpcclient/examples/bitcoincorehttp github.com/monasuite/monad/rpcclient/examples/btcdwebsockets github.com/monasuite/monad/rpcclient/examples/btcwalletwebsockets github.com/monasuite/monad/txscript github.com/monasuite/monad/wire
ok github.com/monasuite/monad (cached)
ok github.com/monasuite/monad/addrmgr (cached)
--- FAIL: TestHaveBlock (1.06s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x188 pc=0x5c8e16]
goroutine 7 [running]:
testing.tRunner.func1(0xc00042a100)
/snap/go/5565/src/testing/testing.go:874 +0x3a3
panic(0x6a77c0, 0xa3c540)
/snap/go/5565/src/runtime/panic.go:679 +0x1b2
github.com/btcsuite/goleveldb/leveldb.(*DB).isClosed(...)
/home/wakiyamap/go/pkg/mod/github.com/btcsuite/[email protected]/leveldb/db_state.go:230
github.com/btcsuite/goleveldb/leveldb.(*DB).ok(...)
/home/wakiyamap/go/pkg/mod/github.com/btcsuite/[email protected]/leveldb/db_state.go:235
github.com/btcsuite/goleveldb/leveldb.(*DB).Get(0x0, 0xc00011d9c8, 0x14, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/wakiyamap/go/pkg/mod/github.com/btcsuite/[email protected]/leveldb/db.go:838 +0x56
github.com/monasuite/monad/blockchain.(*BlockChain).checkBlockHeaderContext(0xc0007aaa80, 0xc0007de080, 0xc0007ea380, 0xc000000000, 0x403572, 0xc0007de084)
/home/wakiyamap/go/src/github.com/monasuite/monad/blockchain/validate.go:705 +0x1d5
github.com/monasuite/monad/blockchain.(*BlockChain).checkBlockContext(0xc0007aaa80, 0xc0007ea070, 0xc0007ea380, 0xc000000000, 0x60697b, 0x6a0fc0)
/home/wakiyamap/go/src/github.com/monasuite/monad/blockchain/validate.go:809 +0x71
github.com/monasuite/monad/blockchain.(*BlockChain).maybeAcceptBlock(0xc0007aaa80, 0xc0007ea070, 0x0, 0x0, 0x0, 0x0)
/home/wakiyamap/go/src/github.com/monasuite/monad/blockchain/accept.go:42 +0xdd
github.com/monasuite/monad/blockchain.(*BlockChain).ProcessBlock(0xc0007aaa80, 0xc0007ea070, 0x0, 0xc0007a0000, 0x0, 0x0)
/home/wakiyamap/go/src/github.com/monasuite/monad/blockchain/process.go:240 +0x302
github.com/monasuite/monad/blockchain.TestHaveBlock(0xc00042a100)
/home/wakiyamap/go/src/github.com/monasuite/monad/blockchain/chain_test.go:52 +0x2d5
testing.tRunner(0xc00042a100, 0x834980)
/snap/go/5565/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
/snap/go/5565/src/testing/testing.go:960 +0x350
FAIL github.com/monasuite/monad/blockchain 1.105s
? github.com/monasuite/monad/blockchain/fullblocktests [no test files]
ok github.com/monasuite/monad/blockchain/indexers (cached)
ok github.com/monasuite/monad/btcec (cached)
ok github.com/monasuite/monad/btcjson (cached)
ok github.com/monasuite/monad/chaincfg (cached)
ok github.com/monasuite/monad/chaincfg/chainhash (cached)
? github.com/monasuite/monad/checkpoint [no test files]
? github.com/monasuite/monad/cmd/addblock [no test files]
? github.com/monasuite/monad/cmd/findcheckpoint [no test files]
? github.com/monasuite/monad/cmd/gencerts [no test files]
? github.com/monasuite/monad/cmd/monactl [no test files]
ok github.com/monasuite/monad/connmgr (cached)
ok github.com/monasuite/monad/database (cached)
? github.com/monasuite/monad/database/cmd/dbtool [no test files]
ok github.com/monasuite/monad/database/ffldb (cached)
ok github.com/monasuite/monad/database/internal/treap (cached)
ok github.com/monasuite/monad/integration (cached)
ok github.com/monasuite/monad/integration/rpctest (cached)
? github.com/monasuite/monad/limits [no test files]
ok github.com/monasuite/monad/mempool (cached)
ok github.com/monasuite/monad/mining (cached)
? github.com/monasuite/monad/mining/cpuminer [no test files]
? github.com/monasuite/monad/netsync [no test files]
ok github.com/monasuite/monad/peer (cached)
ok github.com/monasuite/monad/rpcclient (cached)
? github.com/monasuite/monad/rpcclient/examples/bitcoincorehttp [no test files]
? github.com/monasuite/monad/rpcclient/examples/btcdwebsockets [no test files]
? github.com/monasuite/monad/rpcclient/examples/btcwalletwebsockets [no test files]
ok github.com/monasuite/monad/txscript (cached)
ok github.com/monasuite/monad/wire (cached)
FAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment