aboutsummaryrefslogtreecommitdiffstats
path: root/les
diff options
context:
space:
mode:
authorkiel barry <kiel.j.barry@gmail.com>2018-05-22 04:41:31 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-22 04:41:31 +0800
commit0fe47e98c4d93f952dc7415f401fd03b2664a21d (patch)
treeae30e450e853fe8a03760496b87259077a760e68 /les
parent415969f534d8122e717e18abafdc8ec7bb913a84 (diff)
downloaddexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.gz
dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.zst
dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.zip
trie: fixes to comply with golint (#16771)
Diffstat (limited to 'les')
-rw-r--r--les/odr_requests.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/les/odr_requests.go b/les/odr_requests.go
index c7f06df94..075fcd92c 100644
--- a/les/odr_requests.go
+++ b/les/odr_requests.go
@@ -230,7 +230,7 @@ func (r *TrieRequest) Validate(db ethdb.Database, msg *Msg) error {
}
nodeSet := proofs[0].NodeSet()
// Verify the proof and store if checks out
- if _, err, _ := trie.VerifyProof(r.Id.Root, r.Key, nodeSet); err != nil {
+ if _, _, err := trie.VerifyProof(r.Id.Root, r.Key, nodeSet); err != nil {
return fmt.Errorf("merkle proof verification failed: %v", err)
}
r.Proof = nodeSet
@@ -241,7 +241,7 @@ func (r *TrieRequest) Validate(db ethdb.Database, msg *Msg) error {
// Verify the proof and store if checks out
nodeSet := proofs.NodeSet()
reads := &readTraceDB{db: nodeSet}
- if _, err, _ := trie.VerifyProof(r.Id.Root, r.Key, reads); err != nil {
+ if _, _, err := trie.VerifyProof(r.Id.Root, r.Key, reads); err != nil {
return fmt.Errorf("merkle proof verification failed: %v", err)
}
// check if all nodes have been read by VerifyProof
@@ -400,7 +400,7 @@ func (r *ChtRequest) Validate(db ethdb.Database, msg *Msg) error {
var encNumber [8]byte
binary.BigEndian.PutUint64(encNumber[:], r.BlockNum)
- value, err, _ := trie.VerifyProof(r.ChtRoot, encNumber[:], light.NodeList(proof.Proof).NodeSet())
+ value, _, err := trie.VerifyProof(r.ChtRoot, encNumber[:], light.NodeList(proof.Proof).NodeSet())
if err != nil {
return err
}
@@ -435,7 +435,7 @@ func (r *ChtRequest) Validate(db ethdb.Database, msg *Msg) error {
binary.BigEndian.PutUint64(encNumber[:], r.BlockNum)
reads := &readTraceDB{db: nodeSet}
- value, err, _ := trie.VerifyProof(r.ChtRoot, encNumber[:], reads)
+ value, _, err := trie.VerifyProof(r.ChtRoot, encNumber[:], reads)
if err != nil {
return fmt.Errorf("merkle proof verification failed: %v", err)
}
@@ -529,7 +529,7 @@ func (r *BloomRequest) Validate(db ethdb.Database, msg *Msg) error {
for i, idx := range r.SectionIdxList {
binary.BigEndian.PutUint64(encNumber[2:], idx)
- value, err, _ := trie.VerifyProof(r.BloomTrieRoot, encNumber[:], reads)
+ value, _, err := trie.VerifyProof(r.BloomTrieRoot, encNumber[:], reads)
if err != nil {
return err
}