@@ -31,7 +31,6 @@ import (
31
31
"github.com/ethereum/go-ethereum/core/types"
32
32
"github.com/ethereum/go-ethereum/crypto"
33
33
"github.com/ethereum/go-ethereum/ethdb"
34
- "github.com/ethereum/go-ethereum/light"
35
34
"github.com/ethereum/go-ethereum/log"
36
35
"github.com/ethereum/go-ethereum/rlp"
37
36
"github.com/ethereum/go-ethereum/trie"
@@ -273,7 +272,7 @@ func createAccountRequestResponse(t *testPeer, root common.Hash, origin common.H
273
272
// Unless we send the entire trie, we need to supply proofs
274
273
// Actually, we need to supply proofs either way! This seems to be an implementation
275
274
// quirk in go-ethereum
276
- proof := light . NewNodeSet ()
275
+ proof := trienode . NewProofSet ()
277
276
if err := t .accountTrie .Prove (origin [:], proof ); err != nil {
278
277
t .logger .Error ("Could not prove inexistence of origin" , "origin" , origin , "error" , err )
279
278
}
@@ -283,7 +282,7 @@ func createAccountRequestResponse(t *testPeer, root common.Hash, origin common.H
283
282
t .logger .Error ("Could not prove last item" , "error" , err )
284
283
}
285
284
}
286
- for _ , blob := range proof .NodeList () {
285
+ for _ , blob := range proof .List () {
287
286
proofs = append (proofs , blob )
288
287
}
289
288
return keys , vals , proofs
@@ -353,7 +352,7 @@ func createStorageRequestResponse(t *testPeer, root common.Hash, accounts []comm
353
352
if originHash != (common.Hash {}) || (abort && len (keys ) > 0 ) {
354
353
// If we're aborting, we need to prove the first and last item
355
354
// This terminates the response (and thus the loop)
356
- proof := light . NewNodeSet ()
355
+ proof := trienode . NewProofSet ()
357
356
stTrie := t .storageTries [account ]
358
357
359
358
// Here's a potential gotcha: when constructing the proof, we cannot
@@ -368,7 +367,7 @@ func createStorageRequestResponse(t *testPeer, root common.Hash, accounts []comm
368
367
t .logger .Error ("Could not prove last item" , "error" , err )
369
368
}
370
369
}
371
- for _ , blob := range proof .NodeList () {
370
+ for _ , blob := range proof .List () {
372
371
proofs = append (proofs , blob )
373
372
}
374
373
break
@@ -411,7 +410,7 @@ func createStorageRequestResponseAlwaysProve(t *testPeer, root common.Hash, acco
411
410
if exit {
412
411
// If we're aborting, we need to prove the first and last item
413
412
// This terminates the response (and thus the loop)
414
- proof := light . NewNodeSet ()
413
+ proof := trienode . NewProofSet ()
415
414
stTrie := t .storageTries [account ]
416
415
417
416
// Here's a potential gotcha: when constructing the proof, we cannot
@@ -427,7 +426,7 @@ func createStorageRequestResponseAlwaysProve(t *testPeer, root common.Hash, acco
427
426
t .logger .Error ("Could not prove last item" , "error" , err )
428
427
}
429
428
}
430
- for _ , blob := range proof .NodeList () {
429
+ for _ , blob := range proof .List () {
431
430
proofs = append (proofs , blob )
432
431
}
433
432
break
@@ -599,9 +598,10 @@ func testSyncBloatedProof(t *testing.T, scheme string) {
599
598
vals = append (vals , entry .v )
600
599
}
601
600
// The proofs
602
- proof := light . NewNodeSet ()
601
+ proof := trienode . NewProofSet ()
603
602
if err := t .accountTrie .Prove (origin [:], proof ); err != nil {
604
603
t .logger .Error ("Could not prove origin" , "origin" , origin , "error" , err )
604
+ t .logger .Error ("Could not prove origin" , "origin" , origin , "error" , err )
605
605
}
606
606
// The bloat: add proof of every single element
607
607
for _ , entry := range t .accountValues {
@@ -614,7 +614,7 @@ func testSyncBloatedProof(t *testing.T, scheme string) {
614
614
keys = append (keys [:1 ], keys [2 :]... )
615
615
vals = append (vals [:1 ], vals [2 :]... )
616
616
}
617
- for _ , blob := range proof .NodeList () {
617
+ for _ , blob := range proof .List () {
618
618
proofs = append (proofs , blob )
619
619
}
620
620
if err := t .remote .OnAccounts (t , requestId , keys , vals , proofs ); err != nil {
0 commit comments