Open p4u opened 1 week ago
With this transaction, we can now modify the duration of an existing process (while in READY or PAUSE state).
If interruptible=false the duration can only be extended.
interruptible=false
The cost of the transactions is computed dynamically by: max(newPrice - previousPrice, txBaseCost)
max(newPrice - previousPrice, txBaseCost)
The required new fields already exist on the protobuf models (they were added some weeks ago), so the SDK should have already everything available.
The new transaction is of type: SetProcessTx / SET_PROCESS_DURATION https://github.com/vocdoni/dvote-protobuf/blob/master/src/vochain/vochain.proto#L168
SetProcessTx / SET_PROCESS_DURATION
The new field is uint32 duration and represents seconds. https://github.com/vocdoni/dvote-protobuf/blob/master/src/vochain/vochain.proto#L218
duration
The duration is added to startTime to compute the new endTime: endTime = startTime + duration
endTime = startTime + duration
EndTime cannot be lower than the current blockchain time, and duration must be different from zero.
PS: it would be great to add this feature to the UI, so the process end time can be set at any moment by the organizer or a delegate. cc/ @jpaulet
PR: https://github.com/vocdoni/vocdoni-node/pull/1344
Done in the SDK
With this transaction, we can now modify the duration of an existing process (while in READY or PAUSE state).
If
interruptible=false
the duration can only be extended.The cost of the transactions is computed dynamically by:
max(newPrice - previousPrice, txBaseCost)
The required new fields already exist on the protobuf models (they were added some weeks ago), so the SDK should have already everything available.
The new transaction is of type:
SetProcessTx / SET_PROCESS_DURATION
https://github.com/vocdoni/dvote-protobuf/blob/master/src/vochain/vochain.proto#L168The new field is uint32
duration
and represents seconds. https://github.com/vocdoni/dvote-protobuf/blob/master/src/vochain/vochain.proto#L218The duration is added to startTime to compute the new endTime:
endTime = startTime + duration
EndTime cannot be lower than the current blockchain time, and duration must be different from zero.
PS: it would be great to add this feature to the UI, so the process end time can be set at any moment by the organizer or a delegate. cc/ @jpaulet