wallet: fix offline signing calling a daemon RPC

This commit is contained in:
moneromooo-monero 2019-03-13 11:32:44 +00:00
parent f5d7652f73
commit adf6d7730f
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 36 additions and 23 deletions

View file

@ -410,8 +410,8 @@ namespace tx {
}
}
static unsigned get_rsig_type(bool use_bulletproof, size_t num_outputs){
if (!use_bulletproof){
static unsigned get_rsig_type(const rct::RCTConfig &rct_config, size_t num_outputs){
if (rct_config.range_proof_type == rct::RangeProofBorromean){
return rct::RangeProofBorromean;
} else if (num_outputs > BULLETPROOF_MAX_OUTPUTS){
return rct::RangeProofMultiOutputBulletproof;
@ -506,9 +506,9 @@ namespace tx {
// Rsig decision
auto rsig_data = tsx_data.mutable_rsig_data();
m_ct.rsig_type = get_rsig_type(tx.use_bulletproofs, tx.splitted_dsts.size());
m_ct.rsig_type = get_rsig_type(tx.rct_config, tx.splitted_dsts.size());
rsig_data->set_rsig_type(m_ct.rsig_type);
if (tx.use_bulletproofs){
if (tx.rct_config.range_proof_type != rct::RangeProofBorromean){
m_ct.bp_version = (m_aux_data->bp_version ? m_aux_data->bp_version.get() : 1);
rsig_data->set_bp_version((uint32_t) m_ct.bp_version);
}

View file

@ -281,7 +281,7 @@ namespace tx {
}
bool is_req_bulletproof() const {
return m_ct.tx_data.use_bulletproofs;
return m_ct.tx_data.rct_config.range_proof_type != rct::RangeProofBorromean;
}
bool is_bulletproof() const {