Skip to content

Commit 5ebe0d4

Browse files
author
Jeff Yanta
committed
Ensure scheduling indices are overriden only for auto returns
1 parent 53f19f7 commit 5ebe0d4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/code/server/transaction/action_handler.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,13 @@ func (h *NoPrivacyWithdrawActionHandler) GetFulfillmentMetadata(
428428
NonceValue: cvm.Hash(bh),
429429
})
430430

431+
var intentOrderingIndexOverride *uint64
432+
var actionOrderingIndexOverride *uint32
433+
if h.isAutoReturn {
434+
intentOrderingIndexOverride = pointer.Uint64(math.MaxInt64)
435+
actionOrderingIndexOverride = pointer.Uint32(0)
436+
}
437+
431438
return &newFulfillmentMetadata{
432439
requiresClientSignature: true,
433440
expectedSigner: h.source.VaultOwner,
@@ -437,8 +444,8 @@ func (h *NoPrivacyWithdrawActionHandler) GetFulfillmentMetadata(
437444
source: h.source.Vault,
438445
destination: h.destination,
439446

440-
intentOrderingIndexOverride: pointer.Uint64(math.MaxInt64),
441-
actionOrderingIndexOverride: pointer.Uint32(0),
447+
intentOrderingIndexOverride: intentOrderingIndexOverride,
448+
actionOrderingIndexOverride: actionOrderingIndexOverride,
442449
fulfillmentOrderingIndex: 0,
443450
disableActiveScheduling: h.isAutoReturn,
444451
}, nil

0 commit comments

Comments
 (0)