Class: Reth::ETHProtocol::Status
- Inherits:
-
DEVp2p::Command
- Object
- DEVp2p::Command
- Reth::ETHProtocol::Status
- Defined in:
- lib/reth/eth_protocol.rb
Overview
Inform a peer of it’s current ethereum state. This message should be sent after the initial handshake and prior to any ethereum related messages.
Instance Attribute Summary collapse
-
#sent ⇒ Object
readonly
Returns the value of attribute sent.
Instance Method Summary collapse
- #create(proto, chain_difficulty, chain_head_hash, genesis_hash) ⇒ Object
-
#initialize ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize ⇒ Status
Returns a new instance of Status.
33 34 35 36 |
# File 'lib/reth/eth_protocol.rb', line 33 def initialize super @sent = false end |
Instance Attribute Details
#sent ⇒ Object (readonly)
Returns the value of attribute sent.
31 32 33 |
# File 'lib/reth/eth_protocol.rb', line 31 def sent @sent end |
Instance Method Details
#create(proto, chain_difficulty, chain_head_hash, genesis_hash) ⇒ Object
38 39 40 41 42 |
# File 'lib/reth/eth_protocol.rb', line 38 def create(proto, chain_difficulty, chain_head_hash, genesis_hash) @sent = true network_id = proto.service.app.config[:eth].fetch(:network_id, proto.network_id) [proto.version, network_id, chain_difficulty, chain_head_hash, genesis_hash] end |