All our actions include a data field AbstractAction, while the envelope struct also contains AbstractAction.
the only reason is b/c transfer and execution has a TotalSize() method that needs to access fields in AbstractAction
we change to use Size() (which does not need AbstractAction), and add a hard-fork flag
after the hard-fork, we no longer need TotalSize(), and can remove AbstractAction from all actions
benefits:
simplify code and data structure
better readability, less clumsy code
for example, SignedTransfer now has 7 inputs, after this is done, it will reduce to 3 inputs
Fixes #(issue)
Type of change
Please delete options that are not relevant.
[] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[] Code refactor or improvement
[] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
[] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
[] make test
[] fullsync
[] Other test (please specify)
Test Configuration:
Firmware version:
Hardware:
Toolchain:
SDK:
Checklist:
[] My code follows the style guidelines of this project
[] I have performed a self-review of my code
[] I have commented my code, particularly in hard-to-understand areas
[] I have made corresponding changes to the documentation
[] My changes generate no new warnings
[] I have added tests that prove my fix is effective or that my feature works
[] New and existing unit tests pass locally with my changes
[] Any dependent changes have been merged and published in downstream modules
Description
AbstractAction
, while the envelope struct also containsAbstractAction
.transfer
andexecution
has aTotalSize()
method that needs to access fields inAbstractAction
Size()
(which does not needAbstractAction
), and add a hard-fork flagTotalSize()
, and can removeAbstractAction
from all actionsbenefits:
SignedTransfer
now has 7 inputs, after this is done, it will reduce to 3 inputsFixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: