From 17f0b1194232ebebc4e14f905e6e1d2d148aa5b6 Mon Sep 17 00:00:00 2001 From: changhong Date: Thu, 11 May 2017 09:55:48 +0800 Subject: core: typos and comments improve 1. fix typos 2. methods recevier of struct should be same 3. comments improve (cherry picked from commit 1ba979539582a00b7fd1a7c8a37a6852e59eac0d) --- core/helper_test.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'core/helper_test.go') diff --git a/core/helper_test.go b/core/helper_test.go index fd6a5491c..698a2924c 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -21,8 +21,6 @@ import ( "fmt" "github.com/ethereum/go-ethereum/core/types" - // "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" ) @@ -38,24 +36,24 @@ type TestManager struct { Blocks []*types.Block } -func (s *TestManager) IsListening() bool { +func (tm *TestManager) IsListening() bool { return false } -func (s *TestManager) IsMining() bool { +func (tm *TestManager) IsMining() bool { return false } -func (s *TestManager) PeerCount() int { +func (tm *TestManager) PeerCount() int { return 0 } -func (s *TestManager) Peers() *list.List { +func (tm *TestManager) Peers() *list.List { return list.New() } -func (s *TestManager) BlockChain() *BlockChain { - return s.blockChain +func (tm *TestManager) BlockChain() *BlockChain { + return tm.blockChain } func (tm *TestManager) TxPool() *TxPool { -- cgit v1.2.3