@ -286,10 +286,7 @@ func createAccountRequestResponse(t *testPeer, root common.Hash, origin common.H
t . logger . Error ( "Could not prove last item" , "error" , err )
t . logger . Error ( "Could not prove last item" , "error" , err )
}
}
}
}
for _ , blob := range proof . List ( ) {
return keys , vals , proof . List ( )
proofs = append ( proofs , blob )
}
return keys , vals , proofs
}
}
// defaultStorageRequestHandler is a well-behaving storage request handler
// defaultStorageRequestHandler is a well-behaving storage request handler
@ -371,9 +368,7 @@ func createStorageRequestResponse(t *testPeer, root common.Hash, accounts []comm
t . logger . Error ( "Could not prove last item" , "error" , err )
t . logger . Error ( "Could not prove last item" , "error" , err )
}
}
}
}
for _ , blob := range proof . List ( ) {
proofs = append ( proofs , proof . List ( ) ... )
proofs = append ( proofs , blob )
}
break
break
}
}
}
}
@ -430,9 +425,7 @@ func createStorageRequestResponseAlwaysProve(t *testPeer, root common.Hash, acco
t . logger . Error ( "Could not prove last item" , "error" , err )
t . logger . Error ( "Could not prove last item" , "error" , err )
}
}
}
}
for _ , blob := range proof . List ( ) {
proofs = append ( proofs , proof . List ( ) ... )
proofs = append ( proofs , blob )
}
break
break
}
}
}
}
@ -586,7 +579,6 @@ func testSyncBloatedProof(t *testing.T, scheme string) {
source . accountRequestHandler = func ( t * testPeer , requestId uint64 , root common . Hash , origin common . Hash , limit common . Hash , cap uint64 ) error {
source . accountRequestHandler = func ( t * testPeer , requestId uint64 , root common . Hash , origin common . Hash , limit common . Hash , cap uint64 ) error {
var (
var (
proofs [ ] [ ] byte
keys [ ] common . Hash
keys [ ] common . Hash
vals [ ] [ ] byte
vals [ ] [ ] byte
)
)
@ -618,10 +610,7 @@ func testSyncBloatedProof(t *testing.T, scheme string) {
keys = append ( keys [ : 1 ] , keys [ 2 : ] ... )
keys = append ( keys [ : 1 ] , keys [ 2 : ] ... )
vals = append ( vals [ : 1 ] , vals [ 2 : ] ... )
vals = append ( vals [ : 1 ] , vals [ 2 : ] ... )
}
}
for _ , blob := range proof . List ( ) {
if err := t . remote . OnAccounts ( t , requestId , keys , vals , proof . List ( ) ) ; err != nil {
proofs = append ( proofs , blob )
}
if err := t . remote . OnAccounts ( t , requestId , keys , vals , proofs ) ; err != nil {
t . logger . Info ( "remote error on delivery (as expected)" , "error" , err )
t . logger . Info ( "remote error on delivery (as expected)" , "error" , err )
t . term ( )
t . term ( )
// This is actually correct, signal to exit the test successfully
// This is actually correct, signal to exit the test successfully