Skip to content

Commit

Permalink
Merge pull request #61 from soramitsu/fix/iroha_config
Browse files Browse the repository at this point in the history
update TransferAssets.kt
  • Loading branch information
adaagava authored Mar 20, 2024
2 parents 6994e28 + 1e9a53f commit c69c392
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/main/kotlin/jp/co/soramitsu/load/TransferAssets.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TransferAssets : Wrench13() {
lateinit var anotherDevAssetIdSender: AssetId
lateinit var targetDevAccountIdReceiver: AccountId
lateinit var anotherDevKeyPairSender: KeyPair
lateinit var iroha2Client: Iroha2Client
//lateinit var iroha2Client: Iroha2Client

companion object {
@JvmStatic
Expand All @@ -39,7 +39,7 @@ class TransferAssets : Wrench13() {
val transferAssetsScn = scenario("TransferAssets")
.feed(csv("preconditionList.csv").circular())
.exec { Session ->
iroha2Client = buildClient(SimulationConfig.simulation.configuration())
//iroha2Client = buildClient(SimulationConfig.simulation.configuration())
anotherDevKeyPairSender = adminKeyPair
domainIdSender = Session.get<String>("domainIdSender")!!.asDomainId()
anotherDevAccountIdSender = Session.get<String>("anotherDevAccountIdSender")!!.asAccountId()
Expand Down Expand Up @@ -78,7 +78,8 @@ class TransferAssets : Wrench13() {
//).inc()
//sendMetricsToPrometheus(CustomMetrics.transferAssetCount, "transaction")
//try {
iroha2Client.sendTransaction {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
buildSigned(anotherDevKeyPairSender)
Expand Down Expand Up @@ -106,6 +107,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -115,6 +117,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -124,6 +127,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -133,6 +137,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -142,6 +147,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -151,6 +157,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -160,6 +167,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -169,6 +177,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand All @@ -178,6 +187,7 @@ class TransferAssets : Wrench13() {
Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.sendTransaction {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand Down

0 comments on commit c69c392

Please sign in to comment.