aboutsummaryrefslogtreecommitdiff
path: root/src/ringct/rctTypes.h
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-02-12 12:16:43 +0000
commit77f8f45459e5f067aca3e1a08d68f716f46c22e4 (patch)
treed4753ded08755f0fb279b1660fca2adde8df11bf /src/ringct/rctTypes.h
parentadd a bulletproof version, new bulletproof type, and rct config (diff)
downloadmonero-77f8f45459e5f067aca3e1a08d68f716f46c22e4.tar.xz
ringct: save 3 bytes on bulletproof size
Found by luigi1111
Diffstat (limited to 'src/ringct/rctTypes.h')
-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 e261bbdc8..0a4dad1a0 100644
--- a/src/ringct/rctTypes.h
+++ b/src/ringct/rctTypes.h
@@ -319,7 +319,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)