aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-17 21:50:03 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-11 13:37:28 +0000
commit9ce9f8caf6e290088711ce4d5d90c1507a837bf2 (patch)
tree00ec50f673c5a114352d5f95fcd81938df4dd5ab /src/cryptonote_core/blockchain.cpp
parentperformance_tests: add tx checking tests with more than 2 outputs (diff)
downloadmonero-9ce9f8caf6e290088711ce4d5d90c1507a837bf2.tar.xz
bulletproofs: add multi output bulletproofs to rct
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index e96dc6bb6..c815b507e 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -3059,6 +3059,22 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
MERROR_VER("Unsupported rct type: " << rv.type);
return false;
}
+
+ // for bulletproofs, check they're only multi-output after v8
+ if (rv.type == rct::RCTTypeFullBulletproof || rv.type == rct::RCTTypeSimpleBulletproof)
+ {
+ if (hf_version < 8)
+ {
+ for (const rct::Bulletproof &proof: rv.p.bulletproofs)
+ {
+ if (proof.V.size() > 1)
+ {
+ MERROR_VER("Multi output bulletproofs are invalid before v8");
+ return false;
+ }
+ }
+ }
+ }
}
return true;
}