Class: Reth::ETHProtocol

Inherits:
DEVp2p::Protocol
  • Object
show all
Defined in:
lib/reth/eth_protocol.rb

Overview

DEV Ethereum Wire Protocol

Defined Under Namespace

Classes: BlockHashes, Blocks, GetBlockHashes, GetBlockHashesFromNumber, GetBlocks, NewBlock, NewBlockHashes, Status, Transactions

Constant Summary collapse

MAX_GETBLOCKS_COUNT =
64
MAX_GETBLOCKHASHES_COUNT =
2048

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(peer, service) ⇒ ETHProtocol

Returns a new instance of ETHProtocol.



200
201
202
203
204
205
# File 'lib/reth/eth_protocol.rb', line 200

def initialize(peer, service)
  @config = peer.config
  @network_id = 0

  super(peer, service)
end

Instance Attribute Details

#network_idObject (readonly)

Returns the value of attribute network_id.



198
199
200
# File 'lib/reth/eth_protocol.rb', line 198

def network_id
  @network_id
end