Skip to content

Commit

Permalink
problem: with recent Geth on PoS networks there is no Difficulty valu…
Browse files Browse the repository at this point in the history
…e for blocks
  • Loading branch information
splix committed Nov 27, 2024
1 parent 8076c81 commit c4098f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class BlockContainer(
block.number,
BlockId.from(block),
block.parentHash?.let(BlockId.Companion::from),
block.totalDifficulty,
block.totalDifficulty ?: BigInteger.ZERO,
block.timestamp,
hasTransactions,
raw,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class TrackEthereumTx(
}

fun setBlockDetails(tx: TxDetails, block: BlockJson<TransactionRefJson>): TxDetails {
return if (block.number != null && block.totalDifficulty != null) {
return if (block.number != null) {
tx.withStatus(
blockTotalDifficulty = block.totalDifficulty,
blockTime = block.timestamp
Expand Down

0 comments on commit c4098f8

Please sign in to comment.