Skip to content

Commit

Permalink
fix BP1 exclusion & repeat testnet fork
Browse files Browse the repository at this point in the history
  • Loading branch information
sebseb7 committed Mar 14, 2019
1 parent 7184fda commit be9c191
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cryptonote_core/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static const struct {
{ 3, 150, 0, 1542548718, 0 },
{ 9, 250, 0, 1542648718, 0 },
{ 10, 52000, 51, 1549934499, 1 },
{ 11, 62000, 51, 1552483567, 0 }
{ 11, 62500, 51, 1552491067, 0 }
};

static const struct {
Expand Down Expand Up @@ -2336,7 +2336,7 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
}

// from v11, allow only bulletproofs v2
if (hf_version > HF_VERSION_SMALLER_BP) {
if (hf_version >= HF_VERSION_SMALLER_BP) {
if (tx.version >= 2) {
if (tx.rct_signatures.type == rct::RCTTypeBulletproof)
{
Expand Down
8 changes: 4 additions & 4 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5569,7 +5569,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
if (sd.use_bulletproofs)
{
rct_config.range_proof_type = rct::RangeProofPaddedBulletproof;
rct_config.bp_version = use_fork_rules(HF_VERSION_SMALLER_BP, -10) ? 2 : 1;
rct_config.bp_version = use_fork_rules(HF_VERSION_SMALLER_BP, 0) ? 2 : 1;
}
crypto::secret_key tx_key;
std::vector<crypto::secret_key> additional_tx_keys;
Expand Down Expand Up @@ -5994,7 +5994,7 @@ bool wallet2::sign_multisig_tx(multisig_tx_set &exported_txs, std::vector<crypto
for (const rct::Bulletproof &proof: ptx.tx.rct_signatures.p.bulletproofs)
if (proof.V.size() > 1)
rct_config.range_proof_type = rct::RangeProofPaddedBulletproof;
rct_config.bp_version = use_fork_rules(HF_VERSION_SMALLER_BP, -10) ? 2 : 1;
rct_config.bp_version = use_fork_rules(HF_VERSION_SMALLER_BP, 0) ? 2 : 1;
}
bool r = cryptonote::construct_tx_with_tx_key(m_account.get_keys(), m_subaddresses, sources, sd.splitted_dsts, ptx.change_dts.addr, sd.extra, tx, sd.unlock_time, ptx.tx_key, ptx.additional_tx_keys, sd.use_rct, rct_config, &msout, false);
THROW_WALLET_EXCEPTION_IF(!r, error::tx_not_constructed, sd.sources, sd.splitted_dsts, sd.unlock_time, m_nettype);
Expand Down Expand Up @@ -8306,7 +8306,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
const bool bulletproof = use_fork_rules(get_bulletproof_fork(), 0);
const rct::RCTConfig rct_config {
bulletproof ? rct::RangeProofPaddedBulletproof : rct::RangeProofBorromean,
bulletproof ? (use_fork_rules(HF_VERSION_SMALLER_BP, -10) ? 2 : 1) : 0
bulletproof ? (use_fork_rules(HF_VERSION_SMALLER_BP, 0) ? 2 : 1) : 0
};

const uint64_t base_fee = get_base_fee();
Expand Down Expand Up @@ -8882,7 +8882,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_from(const crypton
const bool bulletproof = use_fork_rules(get_bulletproof_fork(), 0);
const rct::RCTConfig rct_config {
bulletproof ? rct::RangeProofPaddedBulletproof : rct::RangeProofBorromean,
bulletproof ? (use_fork_rules(HF_VERSION_SMALLER_BP, -10) ? 2 : 1) : 0,
bulletproof ? (use_fork_rules(HF_VERSION_SMALLER_BP, 0) ? 2 : 1) : 0,
};
const uint64_t base_fee = get_base_fee();
const uint64_t fee_multiplier = get_fee_multiplier(priority, get_fee_algorithm());
Expand Down

0 comments on commit be9c191

Please sign in to comment.