diff --git a/app/lib/constants.js b/app/lib/constants.js index b2f8138be925245f9940722bde3bd24d08905f5b..09f5e39b11d6972e5bf9c733f82b0bbaa8647bd9 100644 --- a/app/lib/constants.js +++ b/app/lib/constants.js @@ -146,7 +146,7 @@ module.exports = { TRANSACTION_VERSION: 10, REVOCATION_FACTOR: 2, // This is protocol fixed value - NB_DIGITS_UD: 6, // This is protocol fixed value + NB_DIGITS_UD: 4, // This is protocol fixed value FIRST_UNIT_BASE: 0, TRANSACTION_EXPIRY_DELAY: 3600 * 24 * 7, diff --git a/app/lib/dup/indexer.js b/app/lib/dup/indexer.js index 7955f821b0bdf13242cae317dd67e6a713f2d5c8..84bbc11a0555c79ca6eb1d68f81d30cbc4c344f1 100644 --- a/app/lib/dup/indexer.js +++ b/app/lib/dup/indexer.js @@ -837,7 +837,7 @@ const indexer = module.exports = { // BR_G14 prepareUnitBase: (HEAD) => { - if (HEAD.dividend >= Math.pow(10, 6)) { + if (HEAD.dividend >= Math.pow(10, constants.NB_DIGITS_UD)) { HEAD.dividend = Math.ceil(HEAD.dividend / 10); HEAD.new_dividend = HEAD.dividend; HEAD.unitBase = HEAD.unitBase + 1;