aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-06-02 21:20:27 +0800
committerMaran <maran.hidskes@gmail.com>2014-06-02 21:20:27 +0800
commitfb6ff61730ed92ada68c9c5a5b3a6f9976a78161 (patch)
tree63cd039495d38dd047c231d52a3356bdb5e8b3f2 /ethchain
parentff8a834ccc630e85292968aaed8abc52044797f8 (diff)
downloaddexon-fb6ff61730ed92ada68c9c5a5b3a6f9976a78161.tar.gz
dexon-fb6ff61730ed92ada68c9c5a5b3a6f9976a78161.tar.zst
dexon-fb6ff61730ed92ada68c9c5a5b3a6f9976a78161.zip
Implemented Public Peer interface
Diffstat (limited to 'ethchain')
-rw-r--r--ethchain/state_manager.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index a57377bee..8479e9f44 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -2,6 +2,7 @@ package ethchain
import (
"bytes"
+ "container/list"
"fmt"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethwire"
@@ -14,6 +15,16 @@ type BlockProcessor interface {
ProcessBlock(block *Block)
}
+type Peer interface {
+ Inbound() bool
+ LastSend() time.Time
+ LastPong() int64
+ Host() []byte
+ Port() uint16
+ Version() string
+ Connected() *int32
+}
+
type EthManager interface {
StateManager() *StateManager
BlockChain() *BlockChain
@@ -23,6 +34,7 @@ type EthManager interface {
PeerCount() int
IsMining() bool
IsListening() bool
+ Peers() *list.List
}
type StateManager struct {