aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorwilliambannas <wrschwartz@wpi.edu>2018-06-14 18:14:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-06-14 18:14:52 +0800
commit9402f965977620de0dcd968ad6943f66a80bcc5d (patch)
treeb3c6fc4a3aed4299117ff1e0aa83a84eff17cc70 /eth/handler.go
parentd0fd8d6fc29ec859650adf30718e2b06786e854f (diff)
downloadgo-tangerine-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.gz
go-tangerine-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.zst
go-tangerine-9402f965977620de0dcd968ad6943f66a80bcc5d.zip
eth: conform better to the golint standards (#16783)
* eth: made changes to conform better to the golint standards * eth: fix comment nit
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/eth/handler.go b/eth/handler.go
index a46e7f13c..f2d2eaf1c 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -64,7 +64,7 @@ func errResp(code errCode, format string, v ...interface{}) error {
}
type ProtocolManager struct {
- networkId uint64
+ networkID uint64
fastSync uint32 // Flag whether fast sync is enabled (gets disabled if we already have blocks)
acceptTxs uint32 // Flag whether we're considered synchronised (enables transaction processing)
@@ -98,10 +98,10 @@ type ProtocolManager struct {
// NewProtocolManager returns a new Ethereum sub protocol manager. The Ethereum sub protocol manages peers capable
// with the Ethereum network.
-func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkId uint64, mux *event.TypeMux, txpool txPool, engine consensus.Engine, blockchain *core.BlockChain, chaindb ethdb.Database) (*ProtocolManager, error) {
+func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkID uint64, mux *event.TypeMux, txpool txPool, engine consensus.Engine, blockchain *core.BlockChain, chaindb ethdb.Database) (*ProtocolManager, error) {
// Create the protocol manager with the base fields
manager := &ProtocolManager{
- networkId: networkId,
+ networkID: networkID,
eventMux: mux,
txpool: txpool,
blockchain: blockchain,
@@ -263,7 +263,7 @@ func (pm *ProtocolManager) handle(p *peer) error {
number = head.Number.Uint64()
td = pm.blockchain.GetTd(hash, number)
)
- if err := p.Handshake(pm.networkId, td, hash, genesis.Hash()); err != nil {
+ if err := p.Handshake(pm.networkID, td, hash, genesis.Hash()); err != nil {
p.Log().Debug("Ethereum handshake failed", "err", err)
return err
}
@@ -779,7 +779,7 @@ type NodeInfo struct {
func (pm *ProtocolManager) NodeInfo() *NodeInfo {
currentBlock := pm.blockchain.CurrentBlock()
return &NodeInfo{
- Network: pm.networkId,
+ Network: pm.networkID,
Difficulty: pm.blockchain.GetTd(currentBlock.Hash(), currentBlock.NumberU64()),
Genesis: pm.blockchain.Genesis().Hash(),
Config: pm.blockchain.Config(),