Merge pull request #1469 from darcys22/earlier_transfer

Allow HF18 to be used earlier
This commit is contained in:
Jason Rhinelander 2021-07-09 03:03:57 -03:00 committed by GitHub
commit 040f19de5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -121,7 +121,7 @@ get_hard_fork_heights(network_type nettype, uint8_t version) {
if (found.first) // Found something suitable in the previous iteration, so one before this hf is the max
found.second = it->height - 1;
break;
} else if (it->version == version) {
} else if (it->version == version && !found.first) {
found.first = it->height;
}
}

View File

@ -7783,7 +7783,10 @@ uint64_t wallet2::get_fee_percent(uint32_t priority, txtype type) const
THROW_WALLET_EXCEPTION(error::invalid_priority);
uint64_t burn_pct = 0;
if (use_fork_rules(network_version_18, 0))
// v9.2.0 introduced minor versions to forks, this use_fork_rules(18,0) will return the height
// for HF18.1 when we want 18.0. Workaround this by allowing the use of 18 fork rules 4000
// blocks before 18.1
if (use_fork_rules(network_version_18, 4000))
burn_pct = BLINK_BURN_TX_FEE_PERCENT_V18;
else
THROW_WALLET_EXCEPTION(error::invalid_priority);