mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
Fixed lint errors for staticcheck (#4901)
This commit is contained in:
parent
29d2f16bf0
commit
808df67683
@ -98,8 +98,8 @@ func (api *APIImpl) GetFilterChanges(_ context.Context, index string) ([]interfa
|
||||
return stub, nil
|
||||
}
|
||||
if txs, ok := api.filters.ReadPendingTxs(rpchelper.PendingTxsSubID(cutIndex)); ok {
|
||||
for _, v := range txs {
|
||||
for _, tx := range v {
|
||||
if len(txs) > 0 {
|
||||
for _, tx := range txs[0] {
|
||||
stub = append(stub, tx.Hash())
|
||||
}
|
||||
return stub, nil
|
||||
|
@ -115,8 +115,8 @@ func (api *APIImpl) GetFilterChanges(_ context.Context, index string) ([]interfa
|
||||
return stub, nil
|
||||
}
|
||||
if txs, ok := api.filters.ReadPendingTxs(rpchelper.PendingTxsSubID(cutIndex)); ok {
|
||||
for _, v := range txs {
|
||||
for _, tx := range v {
|
||||
if len(txs) > 0 {
|
||||
for _, tx := range txs[0] {
|
||||
stub = append(stub, tx.Hash())
|
||||
}
|
||||
return stub, nil
|
||||
|
@ -513,8 +513,6 @@ func (rs *State22) ReadsValid(readLists map[string]*KvList) bool {
|
||||
} else if !bytes.Equal(val, item.val) {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
//fmt.Printf("key [%x] => [%x] not present in changes\n", key, val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,13 +147,6 @@ func (proof *RangeProof) VerifyAbsence(key []byte) error {
|
||||
return nil // proof ok
|
||||
} else if cmp == 0 {
|
||||
return cmn.NewError("absence disproved via item #%v", i)
|
||||
} else {
|
||||
if i == len(proof.Leaves)-1 {
|
||||
// If last item, check whether
|
||||
// it's the last item in teh tree.
|
||||
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user