You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pallet-accounting has been enhanced with a new set of apis, currently on the opening-balances-adjustments branch.
It should be noted that this is a first version of these apis, and that further enhancements may be made in time.
Tests:
Build comprehensive test cases for:
pub fn set_accounting_ref_date()
pub fn set_opening_balance()
pub fn adjustment()
Set the mock.rs file with the appropriate parameters, and build the tests in test.rs.
Uncomment these line in lib.rs
//pub mod benchmarking;//pub mod mock;//pub mod tests;
Note
The tests should cover scenarios that would cause the extrinsic to fail, as well as those that would allow the extrinsic to succeed. The most complex of the the functions is the adjustments, but it also incorporates checks that are used in the
Benchmarking:
Build the initial benchmarking for all three functions and change the lines #[pallet::weight(0/*TODO*/)] to handle the weights properly.
pub fn set_accounting_ref_date()
pub fn set_opening_balance()
pub fn adjustment()
There may be an additional change to the runtime/src/totem.rs file for the weight parameters.
The text was updated successfully, but these errors were encountered:
The pallet-accounting has been enhanced with a new set of apis, currently on the
opening-balances-adjustments
branch.It should be noted that this is a first version of these apis, and that further enhancements may be made in time.
Tests:
Build comprehensive test cases for:
pub fn set_accounting_ref_date()
pub fn set_opening_balance()
pub fn adjustment()
Set the
mock.rs
file with the appropriate parameters, and build the tests intest.rs
.Uncomment these line in
lib.rs
Note
The tests should cover scenarios that would cause the extrinsic to fail, as well as those that would allow the extrinsic to succeed. The most complex of the the functions is the adjustments, but it also incorporates checks that are used in the
Benchmarking:
Build the initial benchmarking for all three functions and change the lines
#[pallet::weight(0/*TODO*/)]
to handle the weights properly.pub fn set_accounting_ref_date()
pub fn set_opening_balance()
pub fn adjustment()
There may be an additional change to the
runtime/src/totem.rs
file for the weight parameters.The text was updated successfully, but these errors were encountered: