Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mashonskiy committed Sep 20, 2024
1 parent 6882953 commit ad4c796
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 50 deletions.
16 changes: 8 additions & 8 deletions src/main/scala/units/client/contract/ContractBlock.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import units.eth.EthAddress
import units.util.HexBytesConverter.toHex

case class ContractBlock(
hash: BlockHash,
parentHash: BlockHash,
epoch: Int,
height: Long,
minerRewardAddress: EthAddress,
chainId: Long,
e2cTransfersRootHash: Digest,
lastC2ETransferIndex: Long
hash: BlockHash,
parentHash: BlockHash,
epoch: Int,
height: Long,
minerRewardAddress: EthAddress,
chainId: Long,
e2cTransfersRootHash: Digest,
lastC2ETransferIndex: Long
) extends CommonBlockData {
override def toString: String =
s"ContractBlock($hash, p=$parentHash, e=$epoch, h=$height, m=$minerRewardAddress, c=$chainId, " +
Expand Down
22 changes: 11 additions & 11 deletions src/main/scala/units/client/engine/model/ExecutionPayload.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import units.util.HexBytesConverter.*
* https://besu.hyperledger.org/stable/public-networks/reference/engine-api/objects#execution-payload-object tells about milliseconds
*/
case class ExecutionPayload(
hash: BlockHash,
parentHash: BlockHash,
stateRoot: String,
height: Long,
timestamp: Long,
minerRewardAddress: EthAddress,
baseFeePerGas: Uint256,
gasLimit: Long,
gasUsed: Long,
prevRandao: String,
withdrawals: Vector[Withdrawal]
hash: BlockHash,
parentHash: BlockHash,
stateRoot: String,
height: Long,
timestamp: Long,
minerRewardAddress: EthAddress,
baseFeePerGas: Uint256,
gasLimit: Long,
gasUsed: Long,
prevRandao: String,
withdrawals: Vector[Withdrawal]
) extends CommonBlockData {
override def toString: String =
s"ExecutionPayload($hash, p=$parentHash, h=$height, t=$timestamp, m=$minerRewardAddress, w={${withdrawals.mkString(", ")}})"
Expand Down
12 changes: 6 additions & 6 deletions src/test/scala/units/ExtensionDomain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ExtensionDomain(
val eluScheduler: TestScheduler = TestScheduler(ExecutionModel.AlwaysAsyncExecution)

val elBlockStream: PublishSubject[(Channel, NetworkBlock)] = PublishSubject[(Channel, NetworkBlock)]()
val blockObserver: TestBlocksObserver = new TestBlocksObserver(elBlockStream)
val blockObserver: TestBlocksObserver = new TestBlocksObserver(elBlockStream)

val neighbourChannel = new EmbeddedChannel()
val allChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE)
Expand Down Expand Up @@ -232,11 +232,11 @@ class ExtensionDomain(

// Useful for debugging purposes
def evaluateExtendAltChain(
minerAccount: KeyPair,
chainId: Long,
blockData: CommonBlockData,
epoch: Long,
e2CTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex
minerAccount: KeyPair,
chainId: Long,
blockData: CommonBlockData,
epoch: Long,
e2CTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex
): Either[String, JsObject] = {
val r = evaluate(
chainContractAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ trait HasConsensusLayerDappTxHelpers {
)

def extendMainChain(
minerAccount: KeyPair,
blockData: CommonBlockData,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1,
vrf: ByteStr = currentHitSource
minerAccount: KeyPair,
blockData: CommonBlockData,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1,
vrf: ByteStr = currentHitSource
): InvokeScriptTransaction =
TxHelpers.invoke(
invoker = minerAccount,
Expand All @@ -71,10 +71,10 @@ trait HasConsensusLayerDappTxHelpers {
)

def appendBlock(
minerAccount: KeyPair,
blockData: CommonBlockData,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1
minerAccount: KeyPair,
blockData: CommonBlockData,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1
): InvokeScriptTransaction =
TxHelpers.invoke(
invoker = minerAccount,
Expand All @@ -90,11 +90,11 @@ trait HasConsensusLayerDappTxHelpers {
)

def startAltChain(
minerAccount: KeyPair,
blockData: CommonBlockData,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1,
vrf: ByteStr = currentHitSource
minerAccount: KeyPair,
blockData: CommonBlockData,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1,
vrf: ByteStr = currentHitSource
): InvokeScriptTransaction =
TxHelpers.invoke(
invoker = minerAccount,
Expand All @@ -111,12 +111,12 @@ trait HasConsensusLayerDappTxHelpers {
)

def extendAltChain(
minerAccount: KeyPair,
blockData: CommonBlockData,
chainId: Long,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1,
vrf: ByteStr = currentHitSource
minerAccount: KeyPair,
blockData: CommonBlockData,
chainId: Long,
e2cTransfersRootHashHex: String = EmptyE2CTransfersRootHashHex,
lastC2ETransferIndex: Long = -1,
vrf: ByteStr = currentHitSource
): InvokeScriptTransaction =
TxHelpers.invoke(
invoker = minerAccount,
Expand Down Expand Up @@ -165,11 +165,11 @@ trait HasConsensusLayerDappTxHelpers {
)

def withdraw(
sender: KeyPair,
blockData: CommonBlockData,
merkleProof: Seq[Digest],
transferIndexInBlock: Int,
amount: Long
sender: KeyPair,
blockData: CommonBlockData,
merkleProof: Seq[Digest],
transferIndexInBlock: Int,
amount: Long
): InvokeScriptTransaction =
TxHelpers.invoke(
invoker = sender,
Expand Down

0 comments on commit ad4c796

Please sign in to comment.