Fixed lint errors for staticcheck (#4901)

This commit is contained in:
Leonard Chinonso 2022-08-02 15:07:39 +01:00 committed by GitHub
parent 29d2f16bf0
commit 808df67683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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)
}
}
}

View File

@ -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
}
}