Function diem_sdk::transaction_builder::stdlib::encode_initialize_diem_consensus_config_script_function
pub fn encode_initialize_diem_consensus_config_script_function(
sliding_nonce: u64
) -> TransactionPayload
Expand description
Summary
Initializes the Diem consensus config that is stored on-chain. This transaction can only be sent from the Diem Root account.
Technical Description
Initializes the DiemConsensusConfig
on-chain config to empty and allows future updates from DiemRoot via
update_diem_consensus_config
. This doesn’t emit a DiemConfig::NewEpochEvent
.
Parameters
Name | Type | Description |
---|---|---|
account | signer | Signer of the sending account. Must be the Diem Root account. |
sliding_nonce | u64 | The sliding_nonce (see: SlidingNonce ) to be used for this transaction. |
Common Abort Conditions
Error Category | Error Reason | Description |
---|---|---|
Errors::NOT_PUBLISHED | SlidingNonce::ESLIDING_NONCE | A SlidingNonce resource is not published under account . |
Errors::INVALID_ARGUMENT | SlidingNonce::ENONCE_TOO_OLD | The sliding_nonce is too old and it’s impossible to determine if it’s duplicated or not. |
Errors::INVALID_ARGUMENT | SlidingNonce::ENONCE_TOO_NEW | The sliding_nonce is too far in the future. |
Errors::INVALID_ARGUMENT | SlidingNonce::ENONCE_ALREADY_RECORDED | The sliding_nonce has been previously recorded. |
Errors::REQUIRES_ADDRESS | CoreAddresses::EDIEM_ROOT | account is not the Diem Root account. |