les: fix megacheck warnings (#14941)
* les: fix megacheck warnings * les: fixed testGetProofs
This commit is contained in:
committed by
Péter Szilágyi
parent
d375193797
commit
fff6e03a79
@ -44,7 +44,6 @@ type LesServer struct {
|
||||
defParams *flowcontrol.ServerParams
|
||||
lesTopic discv5.Topic
|
||||
quitSync chan struct{}
|
||||
stopped bool
|
||||
}
|
||||
|
||||
func NewLesServer(eth *eth.Ethereum, config *eth.Config) (*LesServer, error) {
|
||||
@ -118,16 +117,6 @@ func (list RequestCostList) decode() requestCostTable {
|
||||
return table
|
||||
}
|
||||
|
||||
func (table requestCostTable) encode() RequestCostList {
|
||||
list := make(RequestCostList, len(table))
|
||||
for idx, code := range reqList {
|
||||
list[idx].MsgCode = code
|
||||
list[idx].BaseCost = table[code].baseCost
|
||||
list[idx].ReqCost = table[code].reqCost
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
type linReg struct {
|
||||
sumX, sumY, sumXX, sumXY float64
|
||||
cnt uint64
|
||||
|
Reference in New Issue
Block a user