From 7759d52a2562a2a2b64ba8893ce128ed29ac7697 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sun, 9 Dec 2018 10:32:26 +0800 Subject: [PATCH] Add old bulletproof type query --- src/ringct/rctTypes.cpp | 12 ++++++++++++ src/ringct/rctTypes.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/ringct/rctTypes.cpp b/src/ringct/rctTypes.cpp index 31d4f7812..2b3141912 100644 --- a/src/ringct/rctTypes.cpp +++ b/src/ringct/rctTypes.cpp @@ -237,6 +237,18 @@ namespace rct { } } + bool is_rct_old_bulletproof(int type) + { + switch (type) + { + case RCTTypeSimpleBulletproof: + case RCTTypeFullBulletproof: + return true; + default: + return false; + } + } + bool is_rct_borromean(int type) { switch (type) diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index e0c64d8ed..512cdb733 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -554,6 +554,7 @@ namespace rct { bool is_rct_simple(int type); bool is_rct_bulletproof(int type); + bool is_rct_old_bulletproof(int type); bool is_rct_borromean(int type); static inline const rct::key &pk2rct(const crypto::public_key &pk) { return (const rct::key&)pk; }