瀏覽代碼

light: enforce camel case variable names (#19054)

Matthew Halpern 6 年之前
父節點
當前提交
325334f61a
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      light/odr_util.go
  2. 1 1
      light/trie.go

+ 1 - 1
light/odr_util.go

@@ -28,7 +28,7 @@ import (
 	"github.com/ethereum/go-ethereum/rlp"
 )
 
-var sha3_nil = crypto.Keccak256Hash(nil)
+var sha3Nil = crypto.Keccak256Hash(nil)
 
 func GetHeaderByNumber(ctx context.Context, odr OdrBackend, number uint64) (*types.Header, error) {
 	db := odr.Database()

+ 1 - 1
light/trie.go

@@ -67,7 +67,7 @@ func (db *odrDatabase) CopyTrie(t state.Trie) state.Trie {
 }
 
 func (db *odrDatabase) ContractCode(addrHash, codeHash common.Hash) ([]byte, error) {
-	if codeHash == sha3_nil {
+	if codeHash == sha3Nil {
 		return nil, nil
 	}
 	if code, err := db.backend.Database().Get(codeHash[:]); err == nil {