tuweni / org.apache.tuweni.devp2p.eth / SimpleBlockchainInformation

SimpleBlockchainInformation

data class SimpleBlockchainInformation : BlockchainInformation (source)

POJO - constant representation of the blockchain information

Parameters

networkID - the network ID

totalDifficulty - the total difficulty of the chain

bestHash - best known hash

bestNumber - best known number

genesisHash - the genesis block hash

forks - known forks

Constructors

<init>

POJO - constant representation of the blockchain information

SimpleBlockchainInformation(networkID: UInt256, totalDifficulty: UInt256, bestHash: Hash, bestNumber: UInt256, genesisHash: Hash, forks: List<Long>)

Properties

bestHash

best known hash

val bestHash: Hash

bestNumber

best known number

val bestNumber: UInt256

forks

known forks

val forks: List<Long>

genesisHash

the genesis block hash

val genesisHash: Hash

networkID

the network ID

val networkID: UInt256

totalDifficulty

the total difficulty of the chain

val totalDifficulty: UInt256

Functions

bestHash

Best block hash we know

fun bestHash(): Hash

bestNumber

Best block number we know

fun bestNumber(): UInt256

forks

Forks of our network we know

fun forks(): List<Long>

genesisHash

Genesis block hash

fun genesisHash(): Hash

networkID

Our network ID. 1 for mainnet.

fun networkID(): UInt256

totalDifficulty

Total difficulty of our canonical chain

fun totalDifficulty(): UInt256