aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-06 13:48:42 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-22 23:17:27 +0000
commitcdc3ccec5fd7925d93babff8a9a421c538f3cce0 (patch)
tree4db1c02592fc10166abf063cd32db34eeca9c205 /src
parentadd a bulletproof version, new bulletproof type, and rct config (diff)
downloadmonero-cdc3ccec5fd7925d93babff8a9a421c538f3cce0.tar.xz
ringct: save 3 bytes on bulletproof size
Found by luigi1111
Diffstat (limited to 'src')
-rw-r--r--src/ringct/rctTypes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h
index 2b302501b..5578a51dc 100644
--- a/src/ringct/rctTypes.h
+++ b/src/ringct/rctTypes.h
@@ -320,7 +320,10 @@ namespace rct {
if (type == RCTTypeBulletproof || type == RCTTypeBulletproof2)
{
uint32_t nbp = bulletproofs.size();
- FIELD(nbp)
+ if (type == RCTTypeBulletproof2)
+ VARINT_FIELD(nbp)
+ else
+ FIELD(nbp)
ar.tag("bp");
ar.begin_array();
if (nbp > outputs)