From 77f8f45459e5f067aca3e1a08d68f716f46c22e4 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 6 Jan 2019 13:48:42 +0000 Subject: [PATCH] ringct: save 3 bytes on bulletproof size Found by luigi1111 --- src/ringct/rctTypes.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)