lisk-sdk icon indicating copy to clipboard operation
lisk-sdk copied to clipboard

Update `error` method of interoperability module

Open ishantiw opened this issue 2 years ago • 0 comments

Description

Update error method of BaseInteroperabilityMethod (mainchain/sidechain) module

def error(ccm: CCM, errorStatus: uint32) -> None:
    # Error codes from 0 to MAX_RESERVED_ERROR_STATUS (included) are reserved to the Interoperability module
    if 0 <= errorStatus <= MAX_RESERVED_ERROR_STATUS:
        raise Exception('Invalid error status.')

    return send(
        EMPTY_FEE_ADDRESS,
        ccm.module,
        ccm.crossChainCommand,
        ccm.sendingChainID,
        0,
        errorStatus,
        ccm.params
    )

Acceptance Criteria

  • Should have corresponding unit tests

Additional Information

  • LIP Updated PR https://github.com/LiskHQ/lips/pull/148

ishantiw avatar Sep 23 '22 08:09 ishantiw