Preparing report...

Report for github.com/ethpool-update-project/open-callisto-pool

B    Not bad!    Found 14 issues across 17 files

Tweet

gofmt58%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo88%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint29%

Golint is a linter for Go source code.

    • open-callisto-pool/policy/policy.go
    • Line 16: warning: exported type Config should have comment or be unexported (golint)
    • Line 24: warning: exported type Limits should have comment or be unexported (golint)
    • Line 31: warning: exported type Banning should have comment or be unexported (golint)
    • Line 40: warning: exported type Stats should have comment or be unexported (golint)
    • Line 53: warning: exported type PolicyServer should have comment or be unexported (golint)
    • Line 67: warning: exported function Start should have comment or be unexported (golint)
    • Line 161: warning: exported method PolicyServer.NewStats should have comment or be unexported (golint)
    • Line 169: warning: exported method PolicyServer.Get should have comment or be unexported (golint)
    • Line 177: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 183: warning: exported method PolicyServer.BanClient should have comment or be unexported (golint)
    • Line 188: warning: exported method PolicyServer.IsBanned should have comment or be unexported (golint)
    • Line 193: warning: exported method PolicyServer.ApplyLimitPolicy should have comment or be unexported (golint)
    • Line 204: warning: exported method PolicyServer.ApplyLoginPolicy should have comment or be unexported (golint)
    • Line 213: warning: exported method PolicyServer.ApplyMalformedPolicy should have comment or be unexported (golint)
    • Line 223: warning: exported method PolicyServer.ApplySharePolicy should have comment or be unexported (golint)
    • Line 287: warning: exported method PolicyServer.InBlackList should have comment or be unexported (golint)
    • Line 293: warning: exported method PolicyServer.InWhiteList should have comment or be unexported (golint)
    • open-callisto-pool/rpc/rpc.go
    • Line 20: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 30: warning: exported type GetBlockReply should have comment or be unexported (golint)
    • Line 44: warning: exported type GetBlockReplyPart should have comment or be unexported (golint)
    • Line 51: warning: exported type TxReceipt should have comment or be unexported (golint)
    • Line 58: warning: exported method TxReceipt.Confirmed should have comment or be unexported (golint)
    • Line 62: warning: comment on exported method TxReceipt.Successful should be of the form "Successful ..." (golint)
    • Line 70: warning: exported type Tx should have comment or be unexported (golint)
    • Line 76: warning: exported type JSONRpcResp should have comment or be unexported (golint)
    • Line 82: warning: exported function NewRPCClient should have comment or be unexported (golint)
    • Line 91: warning: exported method RPCClient.GetWork should have comment or be unexported (golint)
    • Line 101: warning: exported method RPCClient.GetPendingBlock should have comment or be unexported (golint)
    • Line 114: warning: exported method RPCClient.GetBlockByHeight should have comment or be unexported (golint)
    • Line 119: warning: exported method RPCClient.GetBlockByHash should have comment or be unexported (golint)
    • Line 124: warning: exported method RPCClient.GetUncleByBlockNumberAndIndex should have comment or be unexported (golint)
    • Line 142: warning: exported method RPCClient.GetTxReceipt should have comment or be unexported (golint)
    • Line 155: warning: exported method RPCClient.SubmitBlock should have comment or be unexported (golint)
    • Line 165: warning: exported method RPCClient.GetBalance should have comment or be unexported (golint)
    • Line 178: warning: exported method RPCClient.Sign should have comment or be unexported (golint)
    • Line 195: warning: exported method RPCClient.GetPeerCount should have comment or be unexported (golint)
    • Line 208: warning: exported method RPCClient.SendTransaction should have comment or be unexported (golint)
    • Line 266: warning: exported method RPCClient.Check should have comment or be unexported (golint)
    • Line 275: warning: exported method RPCClient.Sick should have comment or be unexported (golint)
    • open-callisto-pool/proxy/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 32: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 52: warning: exported type Stratum should have comment or be unexported (golint)
    • Line 59: warning: exported type Upstream should have comment or be unexported (golint)
    • open-callisto-pool/proxy/proxy.go
    • Line 22: warning: exported type ProxyServer should have comment or be unexported (golint)
    • Line 39: warning: exported type Session should have comment or be unexported (golint)
    • Line 50: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 127: warning: exported method ProxyServer.Start should have comment or be unexported (golint)
    • Line 292: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • open-callisto-pool/proxy/stratum.go
    • Line 16: warning: exported const MaxReqSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported method ProxyServer.ListenTCP should have comment or be unexported (golint)
    • Line 172: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 205: warning: should omit 2nd value from range; this loop is equivalent to `for m := range ...` (golint)
    • open-callisto-pool/util/util.go
    • Line 13: warning: exported var Ether should have comment or be unexported (golint)
    • Line 14: warning: exported var Shannon should have comment or be unexported (golint)
    • Line 20: warning: exported function IsValidHexAddress should have comment or be unexported (golint)
    • Line 27: warning: exported function IsZeroHash should have comment or be unexported (golint)
    • Line 31: warning: exported function MakeTimestamp should have comment or be unexported (golint)
    • Line 35: warning: exported function GetTargetHex should have comment or be unexported (golint)
    • Line 41: warning: exported function TargetHexToDiff should have comment or be unexported (golint)
    • Line 46: warning: exported function ToHex should have comment or be unexported (golint)
    • Line 50: warning: exported function FormatReward should have comment or be unexported (golint)
    • Line 54: warning: exported function FormatRatReward should have comment or be unexported (golint)
    • Line 60: warning: exported function StringInSlice should have comment or be unexported (golint)
    • Line 69: warning: exported function MustParseDuration should have comment or be unexported (golint)
    • Line 77: warning: exported function String2Big should have comment or be unexported (golint)
    • open-callisto-pool/api/server.go
    • Line 21: warning: exported type ApiConfig should have comment or be unexported (golint)
    • Line 38: warning: exported type ApiServer should have comment or be unexported (golint)
    • Line 49: warning: exported type Entry should have comment or be unexported (golint)
    • Line 54: warning: exported function NewApiServer should have comment or be unexported (golint)
    • Line 66: warning: exported method ApiServer.Start should have comment or be unexported (golint)
    • Line 216: warning: exported method ApiServer.StatsIndex should have comment or be unexported (golint)
    • Line 247: warning: exported method ApiServer.MinersIndex should have comment or be unexported (golint)
    • Line 271: warning: exported method ApiServer.BlocksIndex should have comment or be unexported (golint)
    • Line 295: warning: exported method ApiServer.PaymentsIndex should have comment or be unexported (golint)
    • Line 314: warning: exported method ApiServer.AccountIndex should have comment or be unexported (golint)
    • open-callisto-pool/payouts/payer.go
    • Line 22: warning: exported type PayoutsConfig should have comment or be unexported (golint)
    • Line 38: warning: exported method PayoutsConfig.GasHex should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: exported method PayoutsConfig.GasPriceHex should have comment or be unexported (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 48: warning: exported type PayoutsProcessor should have comment or be unexported (golint)
    • Line 56: warning: exported function NewPayoutsProcessor should have comment or be unexported (golint)
    • Line 62: warning: exported method PayoutsProcessor.Start should have comment or be unexported (golint)
    • Line 260: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 269: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 282: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 294: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 303: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 332: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • open-callisto-pool/payouts/unlocker.go
    • Line 19: warning: exported type UnlockerConfig should have comment or be unexported (golint)
    • Line 41: warning: exported type BlockUnlocker should have comment or be unexported (golint)
    • Line 49: warning: exported function NewBlockUnlocker should have comment or be unexported (golint)
    • Line 64: warning: exported method BlockUnlocker.Start should have comment or be unexported (golint)
    • Line 87: warning: exported type UnlockResult should have comment or be unexported (golint)
    • Line 301: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • open-callisto-pool/storage/redis.go
    • Line 16: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported type RedisClient should have comment or be unexported (golint)
    • Line 29: warning: exported type PoolCharts should have comment or be unexported (golint)
    • Line 35: warning: exported type MinerCharts should have comment or be unexported (golint)
    • Line 43: warning: exported type PaymentCharts should have comment or be unexported (golint)
    • Line 49: warning: exported type SumRewardData should have comment or be unexported (golint)
    • Line 58: warning: exported type RewardData should have comment or be unexported (golint)
    • Line 69: warning: exported type BlockData should have comment or be unexported (golint)
    • Line 90: warning: exported method BlockData.RewardInShannon should have comment or be unexported (golint)
    • Line 98: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 103: warning: exported method BlockData.RoundKey should have comment or be unexported (golint)
    • Line 111: warning: exported type Miner should have comment or be unexported (golint)
    • Line 118: warning: comment on exported type Worker should be of the form "Worker ..." (with optional leading article) (golint)
    • Line 126: warning: exported function NewRedisClient should have comment or be unexported (golint)
    • Line 140: warning: exported method RedisClient.Client should have comment or be unexported (golint)
    • Line 144: warning: exported method RedisClient.Check should have comment or be unexported (golint)
    • Line 148: warning: exported method RedisClient.BgSave should have comment or be unexported (golint)
    • Line 152: warning: comment on exported method RedisClient.GetBlacklist should be of the form "GetBlacklist ..." (golint)
    • Line 161: warning: comment on exported method RedisClient.GetWhitelist should be of the form "GetWhitelist ..." (golint)
    • Line 170: warning: exported method RedisClient.WritePoolCharts should have comment or be unexported (golint)
    • Line 176: warning: exported method RedisClient.WriteMinerCharts should have comment or be unexported (golint)
    • Line 182: warning: exported method RedisClient.GetPoolCharts should have comment or be unexported (golint)
    • Line 233: warning: exported method RedisClient.GetAllMinerAccount should have comment or be unexported (golint)
    • Line 256: warning: exported method RedisClient.GetMinerCharts should have comment or be unexported (golint)
    • Line 273: warning: exported method RedisClient.GetPaymentCharts should have comment or be unexported (golint)
    • Line 289: warning: exported method RedisClient.WriteNodeState should have comment or be unexported (golint)
    • Line 305: warning: exported method RedisClient.GetNodeStates should have comment or be unexported (golint)
    • Line 337: warning: exported method RedisClient.WriteShare should have comment or be unexported (golint)
    • Line 360: warning: exported method RedisClient.WriteBlock should have comment or be unexported (golint)
    • Line 388: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 498: warning: exported method RedisClient.GetCandidates should have comment or be unexported (golint)
    • Line 507: warning: exported method RedisClient.GetImmatureBlocks should have comment or be unexported (golint)
    • Line 517: warning: exported method RedisClient.GetRewards should have comment or be unexported (golint)
    • Line 528: warning: exported method RedisClient.GetRoundShares should have comment or be unexported (golint)
    • Line 542: warning: exported method RedisClient.GetPayees should have comment or be unexported (golint)
    • Line 562: warning: should omit 2nd value from range; this loop is equivalent to `for login := range ...` (golint)
    • Line 568: warning: exported method RedisClient.GetTotalShares should have comment or be unexported (golint)
    • Line 578: warning: exported method RedisClient.GetBalance should have comment or be unexported (golint)
    • Line 588: warning: exported method RedisClient.LockPayouts should have comment or be unexported (golint)
    • Line 597: warning: exported method RedisClient.UnlockPayouts should have comment or be unexported (golint)
    • Line 603: warning: exported method RedisClient.IsPayoutsLocked should have comment or be unexported (golint)
    • Line 614: warning: exported type PendingPayment should have comment or be unexported (golint)
    • Line 620: warning: exported method RedisClient.GetPendingPayments should have comment or be unexported (golint)
    • Line 635: warning: comment on exported method RedisClient.UpdateBalance should be of the form "UpdateBalance ..." (golint)
    • Line 653: warning: exported method RedisClient.RollbackBalance should have comment or be unexported (golint)
    • Line 668: warning: exported method RedisClient.WritePayment should have comment or be unexported (golint)
    • Line 692: warning: exported method RedisClient.WriteReward should have comment or be unexported (golint)
    • Line 714: warning: exported method RedisClient.WriteImmatureBlock should have comment or be unexported (golint)
    • Line 732: warning: exported method RedisClient.WriteMaturedBlock should have comment or be unexported (golint)
    • Line 777: warning: exported method RedisClient.WriteOrphan should have comment or be unexported (golint)
    • Line 804: warning: exported method RedisClient.WritePendingOrphans should have comment or be unexported (golint)
    • Line 832: warning: exported method RedisClient.IsMinerExists should have comment or be unexported (golint)
    • Line 836: warning: exported method RedisClient.GetMinerStats should have comment or be unexported (golint)
    • Line 857: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 889: warning: comment on exported method RedisClient.FlushStaleStats should be of the form "FlushStaleStats ..." (golint)
    • Line 927: warning: exported method RedisClient.CollectStats should have comment or be unexported (golint)
    • Line 982: warning: exported method RedisClient.CollectWorkersStats should have comment or be unexported (golint)
    • Line 1074: warning: exported method RedisClient.CollectLuckStats should have comment or be unexported (golint)
    • Line 1337: warning: exported method RedisClient.GetCurrentHashrate should have comment or be unexported (golint)
    • open-callisto-pool/proxy/blocks.go
    • Line 23: warning: exported type BlockTemplate should have comment or be unexported (golint)
    • Line 35: warning: exported type Block should have comment or be unexported (golint)
    • Line 43: warning: exported method Block.Difficulty should have comment or be unexported (golint)
    • Line 44: warning: exported method Block.HashNoNonce should have comment or be unexported (golint)
    • Line 45: warning: exported method Block.Nonce should have comment or be unexported (golint)
    • Line 46: warning: exported method Block.MixDigest should have comment or be unexported (golint)
    • Line 47: warning: exported method Block.NumberU64 should have comment or be unexported (golint)
    • open-callisto-pool/proxy/proto.go
    • Line 5: warning: exported type JSONRpcReq should have comment or be unexported (golint)
    • Line 11: warning: exported type StratumReq should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type JSONPushMessage should be of the form "JSONPushMessage ..." (with optional leading article) (golint)
    • Line 24: warning: exported type JSONRpcResp should have comment or be unexported (golint)
    • Line 31: warning: exported type SubmitReply should have comment or be unexported (golint)
    • Line 35: warning: exported type ErrorReply should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign76%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!