aboutsummaryrefslogtreecommitdiffstats
path: root/trie/errors.go
blob: 76129a70bf8e5e94af8af4976890fed23d5feec3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2015 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

package trie

import (
    "fmt"

    "github.com/ethereum/go-ethereum/common"
)

// MissingNodeError is returned by the trie functions (TryGet, TryUpdate, TryDelete)
// in the case where a trie node is not present in the local database. Contains
// information necessary for retrieving the missing node through an ODR service.
//
// NodeHash is the hash of the missing node
//
// RootHash is the original root of the trie that contains the node
//
// Key is a binary-encoded key that contains the prefix that leads to the first
// missing node and optionally a suffix that hints on which further nodes should
// also be retrieved
//
// PrefixLen is the nibble length of the key prefix that leads from the root to
// the missing node
//
// SuffixLen is the nibble length of the remaining part of the key that hints on
// which further nodes should also be retrieved (can be zero when there are no
// such hints in the error message)
type MissingNodeError struct {
    RootHash, NodeHash   common.Hash
    Key                  []byte
    PrefixLen, SuffixLen int
}

func (err *MissingNodeError) Error() string {
    return fmt.Sprintf("Missing trie node %064x", err.NodeHash)
}
s='column1'>| | | = Define DOCS option * Add NO_STAGE all over the place in preparation for the staging support (cat: ↵bapt2013-09-211-0/+1 | | | | devel part 1) * Style: tab -> space.eadler2013-03-291-1/+1 | | | | Most contributors copy an existing port when writing their own so reduce the number of bad examples in the tree. * Decommissioning java 1.5 (EOLed since October 2009):bapt2012-12-101-6/+2 | | | | suppress any reference to USE_JAVA= 1.5+ (part1) * Now that the Java 1.3 and Java 1.4 ports are deprecated and will expire soon,linimon2011-07-211-1/+1 | | | | | | | | | | | | | | | | remove support for them from bsd.java.mk. As Jikes is not available in Java 1.5 or higher, remove it from bsd.java.mk too (suggested by hq@) and from the ports which used it (only occurences were USE_JIKES=no). Support for the Blackdown VM is also removed, as it is not available in Java 1.5 and higher. Also remove the mapping from Java 1.1-1.4 to Java 1.5+ in bsd.java.mk to detect old, broken ports; therefore bump the minimal value of JAVA_VERSION to 1.5. While here, replace static values of JAVA_VERSION in files/*.in by %%JAVA_VERSION%% . PR: ports/158969 Submitted by: rene Tested on: pointyhat-west -exp