mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
Update proof_test.go
This commit is contained in:
parent
15a9e92bbd
commit
92df1d57dc
1 changed files with 18 additions and 18 deletions
|
|
@ -262,8 +262,8 @@ func TestRangeProofWithInvalidNonExistentProof(t *testing.T) {
|
|||
t.Fatalf("Failed to prove the last node %v", err)
|
||||
}
|
||||
start = 105 // Gap created
|
||||
k := make([][]byte, 0)
|
||||
v := make([][]byte, 0)
|
||||
k := make([][]byte, 0, end-start)
|
||||
v := make([][]byte, 0, end-start)
|
||||
for i := start; i < end; i++ {
|
||||
k = append(k, entries[i].k)
|
||||
v = append(v, entries[i].v)
|
||||
|
|
@ -432,8 +432,8 @@ func TestSingleSideRangeProof(t *testing.T) {
|
|||
if err := trie.Prove(entries[pos].k, proof); err != nil {
|
||||
t.Fatalf("Failed to prove the first node %v", err)
|
||||
}
|
||||
k := make([][]byte, 0)
|
||||
v := make([][]byte, 0)
|
||||
k := make([][]byte, 0, pos+1)
|
||||
v := make([][]byte, 0, pos+1)
|
||||
for i := 0; i <= pos; i++ {
|
||||
k = append(k, entries[i].k)
|
||||
v = append(v, entries[i].v)
|
||||
|
|
@ -636,8 +636,8 @@ func TestHasRightElement(t *testing.T) {
|
|||
if err := trie.Prove(entries[c.end-1].k, proof); err != nil {
|
||||
t.Fatalf("Failed to prove the first node %v", err)
|
||||
}
|
||||
k := make([][]byte, 0)
|
||||
v := make([][]byte, 0)
|
||||
k := make([][]byte, 0, end-start)
|
||||
v := make([][]byte, 0, end-start)
|
||||
for i := start; i < end; i++ {
|
||||
k = append(k, entries[i].k)
|
||||
v = append(v, entries[i].v)
|
||||
|
|
|
|||
Loading…
Reference in a new issue