Skip to content

Commit

Permalink
update to spec 6000000
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala committed Aug 30, 2023
1 parent 514f05f commit c18bc58
Show file tree
Hide file tree
Showing 14 changed files with 9,495 additions and 6,998 deletions.
4 changes: 2 additions & 2 deletions app/Makefile.version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is the `transaction_version` field of `Runtime`
APPVERSION_M=3
APPVERSION_M=4
# This is the `spec_version` field of `Runtime`
APPVERSION_N=5001030
APPVERSION_N=6000000
# This is the patch version of this release
APPVERSION_P=0
36 changes: 18 additions & 18 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ parser_error_t _readMethod(
pd_Method_t* method)
{
switch (c->tx_obj->transactionVersion) {
case 3:
return _readMethod_V3(c, moduleIdx, callIdx, &method->V3);
case 4:
return _readMethod_V4(c, moduleIdx, callIdx, &method->V4);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -36,18 +36,18 @@ parser_error_t _readMethod(
uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 3:
return _getMethod_NumItems_V3(moduleIdx, callIdx);
case 4:
return _getMethod_NumItems_V4(moduleIdx, callIdx);
default:
return parser_tx_version_not_supported;
return 0;
}
}

const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx)
{
switch (transactionVersion) {
case 3:
return _getMethod_ModuleName_V3(moduleIdx);
case 4:
return _getMethod_ModuleName_V4(moduleIdx);
default:
return NULL;
}
Expand All @@ -56,18 +56,18 @@ const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx
const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 3:
return _getMethod_Name_V3(moduleIdx, callIdx);
case 4:
return _getMethod_Name_V4(moduleIdx, callIdx);
default:
return 0;
return NULL;
}
}

const char* _getMethod_ItemName(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx, uint8_t itemIdx)
{
switch (transactionVersion) {
case 3:
return _getMethod_ItemName_V3(moduleIdx, callIdx, itemIdx);
case 4:
return _getMethod_ItemName_V4(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -78,8 +78,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
uint8_t pageIdx, uint8_t* pageCount)
{
switch (transactionVersion) {
case 3:
return _getMethod_ItemValue_V3(&m->V3, moduleIdx, callIdx, itemIdx, outValue,
case 4:
return _getMethod_ItemValue_V4(&m->V4, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_tx_version_not_supported;
Expand All @@ -89,8 +89,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx, uint8_t itemIdx)
{
switch (transactionVersion) {
case 3:
return _getMethod_ItemIsExpert_V3(moduleIdx, callIdx, itemIdx);
case 4:
return _getMethod_ItemIsExpert_V4(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -99,8 +99,8 @@ bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uin
bool _getMethod_IsNestingSupported(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 3:
return _getMethod_IsNestingSupported_V3(moduleIdx, callIdx);
case 4:
return _getMethod_IsNestingSupported_V4(moduleIdx, callIdx);
default:
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/substrate/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {

#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V3.h"
#include "substrate_dispatch_V4.h"
#include <stddef.h>
#include <stdint.h>

Expand All @@ -32,8 +32,8 @@ extern "C" {
{ \
switch (txVersion) { \
\
case 3: \
return PD_CALL_##CALL##_V3; \
case 4: \
return PD_CALL_##CALL##_V4; \
\
default: \
return 0; \
Expand Down
Loading

0 comments on commit c18bc58

Please sign in to comment.