File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ inScope(Global)(
1919 " -unchecked" ,
2020 " -language:higherKinds" ,
2121 " -language:implicitConversions" ,
22- " -language:postfixOps"
22+ " -language:postfixOps" ,
23+ " -language:experimental.namedTuples"
2324 )
2425 )
2526)
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import com.wavesplatform.utx.UtxPool
2222import com .wavesplatform .wallet .Wallet
2323import io .netty .channel .Channel
2424import io .netty .channel .group .DefaultChannelGroup
25+ import kamon .Kamon
2526import monix .execution .cancelables .SerialCancelable
2627import monix .execution .{CancelableFuture , Scheduler }
2728import play .api .libs .json .*
@@ -1735,6 +1736,18 @@ class ELUpdater(
17351736
17361737 private def setState (label : String , newState : State ): Unit = {
17371738 logger.trace(s " New state after $label: $newState" )
1739+ val chainIdOpt = newState match {
1740+ case Working (chainStatus = cs) =>
1741+ cs match {
1742+ case FollowingChain (nodeChainInfo = ChainInfo (id = id)) => Some (id)
1743+ case Mining (nodeChainInfo = Right (nci)) => Some (nci.id)
1744+ case _ => None
1745+ }
1746+ case _ => None
1747+ }
1748+
1749+ chainIdOpt.foreach(chainId => Kamon .gauge(" consensus-client.chain-id" ).withTag(" chain-contract" , config.chainContract).update(chainId.toDouble))
1750+
17381751 state = newState
17391752 }
17401753}
You can’t perform that action at this time.
0 commit comments