mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
[Speedy] move submissionTime in OnLedger case class (#15427)
This commit is contained in:
parent
e23f0a5cde
commit
ed9d9c7ae6
@ -453,7 +453,7 @@ class Engine(val config: EngineConfig = Engine.StableConfig) {
|
||||
deps(tx).flatMap { deps =>
|
||||
val meta = Tx.Metadata(
|
||||
submissionSeed = None,
|
||||
submissionTime = machine.submissionTime,
|
||||
submissionTime = onLedger.submissionTime,
|
||||
usedPackages = deps,
|
||||
dependsOnTime = onLedger.getDependsOnTime,
|
||||
nodeSeeds = nodeSeeds,
|
||||
|
@ -981,7 +981,7 @@ private[lf] object SBuiltin {
|
||||
case _ =>
|
||||
onLedger.ptx
|
||||
.insertCreate(
|
||||
submissionTime = machine.submissionTime,
|
||||
submissionTime = onLedger.submissionTime,
|
||||
templateId = cached.templateId,
|
||||
arg = createArgValue,
|
||||
agreementText = agreement,
|
||||
|
@ -126,6 +126,7 @@ private[lf] object Speedy {
|
||||
|
||||
final case class OnLedger(
|
||||
validating: Boolean,
|
||||
submissionTime: Time.Timestamp,
|
||||
contractKeyUniqueness: ContractKeyUniquenessMode,
|
||||
/* The current partial transaction */
|
||||
private[speedy] var ptx: PartialTransaction,
|
||||
@ -300,7 +301,6 @@ private[lf] object Speedy {
|
||||
var compiledPackages: CompiledPackages,
|
||||
/* Profile of the run when the packages haven been compiled with profiling enabled. */
|
||||
val profile: Profile = new Profile(),
|
||||
val submissionTime: Time.Timestamp,
|
||||
/* True if we are running on ledger building transactions, false if we
|
||||
are running off-ledger code, e.g., Daml Script or
|
||||
Triggers. It is safe to use on ledger for off ledger code but
|
||||
@ -927,9 +927,9 @@ private[lf] object Speedy {
|
||||
|
||||
new Machine(
|
||||
sexpr = exprWithDisclosures,
|
||||
submissionTime = submissionTime,
|
||||
ledgerMode = OnLedger(
|
||||
validating = validating,
|
||||
submissionTime = submissionTime,
|
||||
ptx = PartialTransaction
|
||||
.initial(
|
||||
contractKeyUniqueness,
|
||||
@ -1034,7 +1034,6 @@ private[lf] object Speedy {
|
||||
)(implicit loggingContext: LoggingContext): Machine = {
|
||||
new Machine(
|
||||
sexpr = expr,
|
||||
submissionTime = Time.Timestamp.Epoch,
|
||||
ledgerMode = OffLedger,
|
||||
traceLog = traceLog,
|
||||
warningLog = warningLog,
|
||||
|
@ -151,7 +151,6 @@ private[speedy] object SpeedyTestLib {
|
||||
loggingContext = machine.loggingContext,
|
||||
compiledPackages = machine.compiledPackages,
|
||||
profile = machine.profile,
|
||||
submissionTime = machine.submissionTime,
|
||||
ledgerMode = machine.ledgerMode,
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user