|
|
@ -918,11 +918,11 @@ namespace xmreg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
decode_ringct(const rct::rctSig& rv,
|
|
|
|
decode_ringct(rct::rctSig const& rv,
|
|
|
|
const crypto::key_derivation &derivation,
|
|
|
|
crypto::key_derivation const& derivation,
|
|
|
|
unsigned int i,
|
|
|
|
unsigned int i,
|
|
|
|
rct::key & mask,
|
|
|
|
rct::key& mask,
|
|
|
|
uint64_t & amount)
|
|
|
|
uint64_t& amount)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -933,25 +933,27 @@ namespace xmreg
|
|
|
|
switch (rv.type)
|
|
|
|
switch (rv.type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case rct::RCTTypeSimple:
|
|
|
|
case rct::RCTTypeSimple:
|
|
|
|
|
|
|
|
case rct::RCTTypeSimpleBulletproof:
|
|
|
|
amount = rct::decodeRctSimple(rv,
|
|
|
|
amount = rct::decodeRctSimple(rv,
|
|
|
|
rct::sk2rct(scalar1),
|
|
|
|
rct::sk2rct(scalar1),
|
|
|
|
i,
|
|
|
|
i,
|
|
|
|
mask);
|
|
|
|
mask);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case rct::RCTTypeFull:
|
|
|
|
case rct::RCTTypeFull:
|
|
|
|
|
|
|
|
case rct::RCTTypeFullBulletproof:
|
|
|
|
amount = rct::decodeRct(rv,
|
|
|
|
amount = rct::decodeRct(rv,
|
|
|
|
rct::sk2rct(scalar1),
|
|
|
|
rct::sk2rct(scalar1),
|
|
|
|
i,
|
|
|
|
i,
|
|
|
|
mask);
|
|
|
|
mask);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
cerr << "Unsupported rct type: " << rv.type << endl;
|
|
|
|
cerr << "Unsupported rct type: " << rv.type << '\n';
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cerr << "Failed to decode input " << i << endl;
|
|
|
|
cerr << "Failed to decode input " << i << '\n';
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|