Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion seedemu/services/EthereumService/EthereumServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .EthEnum import *
from .EthUtil import *
from typing import Tuple, List
from seedemu.services import EthereumService
from seedemu.services.EthereumService import *
from .EthTemplates import EthServerFileTemplates, GethCommandTemplates
from .EthTemplates.LighthouseCommandTemplates import *

Expand Down Expand Up @@ -110,6 +110,8 @@ def install(self, node: Node, eth: EthereumService):
node.appendClassName('EthereumService')
node.setLabel('node_id', self.getId())
node.setLabel('consensus', self._consensus_mechanism.value)
node.setLabel('blockchain', self._blockchain.getChainName())
node.setLabel('chain_id', self._blockchain.getChainId())

ifaces = node.getInterfaces()
assert len(ifaces) > 0, 'EthereumServer::install: node as{}/{} has no interfaces'.format(node.getAsn(), node.getName())
Expand Down
7 changes: 7 additions & 0 deletions seedemu/services/EthereumService/EthereumService.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ def addExternalAccount(self, address: str, balance: int) -> Blockchain:

return self

def getChainName(self) -> str:
return self.__chain_name

def getChainId(self) -> int:
return self.__chain_id


def _log(self, message: str) -> None:
"""!
@brief Log to stderr.
Expand Down