github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/trie/errors.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 19:16:45</date> 10 //</624450122847096832> 11 12 13 package trie 14 15 import ( 16 "fmt" 17 18 "github.com/ethereum/go-ethereum/common" 19 ) 20 21 //trie函数(tryget、tryupdate、trydelete)返回MissingNodeError 22 //如果本地数据库中没有trie节点。它包含 23 //检索丢失节点所需的信息。 24 type MissingNodeError struct { 25 NodeHash common.Hash //缺少节点的哈希 26 Path []byte //丢失节点的十六进制编码路径 27 } 28 29 func (err *MissingNodeError) Error() string { 30 return fmt.Sprintf("missing trie node %x (path %x)", err.NodeHash, err.Path) 31 } 32