forked from lthn/blockchain
Merge branch 'develop' of github.com:hyle-team/zano into develop
This commit is contained in:
commit
61e7cb855f
3 changed files with 5 additions and 8 deletions
|
|
@ -27,9 +27,11 @@
|
|||
namespace crypto {
|
||||
|
||||
DISABLE_GCC_AND_CLANG_WARNING(strict-aliasing)
|
||||
const unsigned char Z_[32] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
const unsigned char I_[32] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
const unsigned char L_[32] = { 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 };
|
||||
|
||||
const key_image Z = *reinterpret_cast<const key_image*>(&Z_);
|
||||
const key_image I = *reinterpret_cast<const key_image*>(&I_);
|
||||
const key_image L = *reinterpret_cast<const key_image*>(&L_);
|
||||
|
||||
|
|
@ -148,10 +150,7 @@ namespace crypto {
|
|||
ge_p3 A = ge_p3();
|
||||
ge_p2 R = ge_p2();
|
||||
if (ge_frombytes_vartime(&A, reinterpret_cast<const unsigned char*>(&P)) != 0)
|
||||
{
|
||||
crypto_assert(false);
|
||||
throw std::runtime_error(__func__);
|
||||
}
|
||||
return Z;
|
||||
ge_scalarmult(&R, reinterpret_cast<const unsigned char*>(&a), &A);
|
||||
key_image a_p = key_image();
|
||||
ge_tobytes(reinterpret_cast<unsigned char*>(&a_p), &R);
|
||||
|
|
@ -161,9 +160,8 @@ namespace crypto {
|
|||
bool crypto_ops::validate_key_image(const key_image& ki)
|
||||
{
|
||||
if (!(scalarmult_key(ki, L) == I))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
#define BUILD_COMMIT_ID "@VERSION@"
|
||||
#define PROJECT_VERSION "1.0"
|
||||
#define PROJECT_VERSION_BUILD_NO 30
|
||||
#define PROJECT_VERSION_BUILD_NO 31
|
||||
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
||||
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@ bool wallet_rpc_integrated_address_transfer::c1(currency::core& c, size_t ev_ind
|
|||
tools::wallet_rpc::COMMAND_RPC_TRANSFER::request req = AUTO_VAL_INIT(req);
|
||||
req.fee = TESTS_DEFAULT_FEE;
|
||||
req.mixin = 0;
|
||||
req.unlock_time = 0;
|
||||
tools::wallet_rpc::trnsfer_destination tds = AUTO_VAL_INIT(tds);
|
||||
tds.address = alice_integrated_address;
|
||||
tds.amount = MK_TEST_COINS(3);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue