Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remyhaemmerle-da committed May 13, 2020
1 parent fbf6a21 commit 1c31fcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ object KVTest {

def runCommand(
submitter: Party,
submissionSeed: Option[crypto.Hash],
submissionSeed: crypto.Hash,
additionalContractDataTy: String,
cmds: Command*,
): KVTest[(Transaction.AbsTransaction, Transaction.Metadata)] =
Expand Down Expand Up @@ -198,15 +198,15 @@ object KVTest {

def runSimpleCommand(
submitter: Party,
submissionSeed: Option[crypto.Hash],
submissionSeed: crypto.Hash,
cmds: Command*,
): KVTest[(Transaction.AbsTransaction, Transaction.Metadata)] =
runCommand(submitter, submissionSeed, defaultAdditionalContractDataTy, cmds: _*)

def submitTransaction(
submitter: Party,
transaction: (Transaction.AbsTransaction, Transaction.Metadata),
submissionSeed: Option[crypto.Hash],
submissionSeed: crypto.Hash,
letDelta: Duration = Duration.ZERO,
commandId: CommandId = randomLedgerString,
deduplicationTime: Duration = Duration.ofDays(1)): KVTest[(DamlLogEntryId, DamlLogEntry)] =
Expand All @@ -226,7 +226,7 @@ object KVTest {
ledgerEffectiveTime = testState.recordTime.addMicros(letDelta.toNanos / 1000),
workflowId = None,
submissionTime = txMetaData.submissionTime,
submissionSeed = submissionSeed,
submissionSeed = Some(submissionSeed),
optUsedPackages = Some(txMetaData.usedPackages),
optNodeSeeds = None,
optByKeyNodes = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class KVUtilsTransactionSpec extends WordSpec with Matchers {
val seeds =
Stream
.from(0)
.map(i => Some(crypto.Hash.hashPrivateKey(this.getClass.getName + i.toString)))
.map(i => crypto.Hash.hashPrivateKey(this.getClass.getName + i.toString))
for {
transaction1 <- runSimpleCommand(alice, seeds(0), simpleCreateCmd)
result <- submitTransaction(
Expand Down Expand Up @@ -279,7 +279,7 @@ class KVUtilsTransactionSpec extends WordSpec with Matchers {
val seeds =
Stream
.from(0)
.map(i => Some(crypto.Hash.hashPrivateKey(this.getClass.getName + i.toString)))
.map(i => crypto.Hash.hashPrivateKey(this.getClass.getName + i.toString))

val simpleCreateAndExerciseCmd = createAndExerciseCmd(simpleTemplateId, simpleTemplateArg)

Expand Down Expand Up @@ -338,5 +338,5 @@ class KVUtilsTransactionSpec extends WordSpec with Matchers {
}
}

private def hash(s: String) = Some(crypto.Hash.hashPrivateKey(s))
private def hash(s: String) = crypto.Hash.hashPrivateKey(s)
}

0 comments on commit 1c31fcd

Please sign in to comment.