trie: remove parameter 'fromLevel' in Prove (#27512)
This removes the feature where top nodes of the proof can be elided. It was intended to be used by the LES server, to save bandwidth when the client had already fetched parts of the state and only needed some extra nodes to complete the proof. Alas, it never got implemented in the client.
This commit is contained in:
@@ -113,10 +113,10 @@ func (f *fuzzer) fuzz() int {
|
||||
break
|
||||
}
|
||||
proof := memorydb.New()
|
||||
if err := tr.Prove(entries[start].k, 0, proof); err != nil {
|
||||
if err := tr.Prove(entries[start].k, proof); err != nil {
|
||||
panic(fmt.Sprintf("Failed to prove the first node %v", err))
|
||||
}
|
||||
if err := tr.Prove(entries[end-1].k, 0, proof); err != nil {
|
||||
if err := tr.Prove(entries[end-1].k, proof); err != nil {
|
||||
panic(fmt.Sprintf("Failed to prove the last node %v", err))
|
||||
}
|
||||
var keys [][]byte
|
||||
|
||||
@@ -187,7 +187,7 @@ func runRandTest(rt randTest) error {
|
||||
return errors.New("hash mismatch in opItercheckhash")
|
||||
}
|
||||
case opProve:
|
||||
rt[i].err = tr.Prove(step.key, 0, proofDb{})
|
||||
rt[i].err = tr.Prove(step.key, proofDb{})
|
||||
}
|
||||
// Abort the test on error.
|
||||
if rt[i].err != nil {
|
||||
|
||||
Reference in New Issue
Block a user