In the protocol account id generation requires PoW. However, for testing, we want to decrease these requirements, otherwise it becomes to slow to run the tests. To reduce the PoW requirements we have to patch both the Rust and the Masm code. The former is done using cfg! and the later is done via patching the MASM code.
The above however has an issue that it is easy to lose the synchronization of said constants, causing test failures that can be time consuming to debug.
To fix the above, ideally we would delay inlining the constants until execution time, allowing the tests to overwrite the source code constants.
In the protocol account id generation requires PoW. However, for testing, we want to decrease these requirements, otherwise it becomes to slow to run the tests. To reduce the PoW requirements we have to patch both the Rust and the Masm code. The former is done using
cfg!
and the later is done via patching the MASM code.The above however has an issue that it is easy to lose the synchronization of said constants, causing test failures that can be time consuming to debug.
To fix the above, ideally we would delay inlining the constants until execution time, allowing the tests to overwrite the source code constants.