ethwire => wire

This commit is contained in:
obscuren
2014-10-31 14:53:42 +01:00
parent af34749a6b
commit 4914a78c8c
14 changed files with 74 additions and 291 deletions

View File

@@ -11,10 +11,10 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/ethwire"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/wire"
)
var statelogger = logger.NewLogger("BLOCK")
@@ -35,13 +35,13 @@ type EthManager interface {
StateManager() *StateManager
ChainManager() *ChainManager
TxPool() *TxPool
Broadcast(msgType ethwire.MsgType, data []interface{})
Broadcast(msgType wire.MsgType, data []interface{})
PeerCount() int
IsMining() bool
IsListening() bool
Peers() *list.List
KeyManager() *crypto.KeyManager
ClientIdentity() ethwire.ClientIdentity
ClientIdentity() wire.ClientIdentity
Db() ethutil.Database
EventMux() *event.TypeMux
}

View File

@@ -7,9 +7,9 @@ import (
"math/big"
"sync"
"github.com/ethereum/go-ethereum/ethwire"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/wire"
)
var txplogger = logger.NewLogger("TXP")
@@ -93,7 +93,7 @@ func (pool *TxPool) addTransaction(tx *Transaction) {
pool.pool.PushBack(tx)
// Broadcast the transaction to the rest of the peers
pool.Ethereum.Broadcast(ethwire.MsgTxTy, []interface{}{tx.RlpData()})
pool.Ethereum.Broadcast(wire.MsgTxTy, []interface{}{tx.RlpData()})
}
func (pool *TxPool) ValidateTransaction(tx *Transaction) error {