diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2021-02-14 17:45:04 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-04-05 18:50:22 +0000 |
commit | 4c94cfecfcb96c218b37234eda2f9c262821cf7c (patch) | |
tree | af8183f3dacf18298fe0f6f5493c2dc48ebcc1cd /src/cryptonote_basic | |
parent | ringct: port some of vtnerd's review changes from BP+ to BP (diff) | |
download | monero-4c94cfecfcb96c218b37234eda2f9c262821cf7c.tar.xz |
store outPk/8 in the tx for speed
It avoids dividing by 8 when deserializing a tx, which is a slow
operation, and multiplies by 8 when verifying and extracing the
amount, which is much faster as well as less frequent
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r-- | src/cryptonote_basic/cryptonote_format_utils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index 8c10fad1f..cedc6f546 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -189,7 +189,7 @@ namespace cryptonote CHECK_AND_ASSERT_MES(n_amounts == rv.outPk.size(), false, "Internal error filling out V"); rv.p.bulletproofs_plus[0].V.resize(n_amounts); for (size_t i = 0; i < n_amounts; ++i) - rv.p.bulletproofs_plus[0].V[i] = rct::scalarmultKey(rv.outPk[i].mask, rct::INV_EIGHT); + rv.p.bulletproofs_plus[0].V[i] = rv.outPk[i].mask; } else if (bulletproof) { |