Implement negative UNL functionality:

This change can help improve the liveness of the network during periods of network
instability, by allowing the network to track which validators are presently not online
and to disregard them for the purposes of quorum calculations.
This commit is contained in:
Peng Wang
2020-03-01 21:03:19 -05:00
committed by manojsdoshi
parent 51bd4626b1
commit 706ca874b0
41 changed files with 4344 additions and 73 deletions

View File

@@ -86,6 +86,7 @@ invoke_preflight(PreflightContext const& ctx)
return DeleteAccount ::preflight(ctx);
case ttAMENDMENT:
case ttFEE:
case ttUNL_MODIFY:
return Change ::preflight(ctx);
default:
assert(false);
@@ -173,6 +174,7 @@ invoke_preclaim(PreclaimContext const& ctx)
return invoke_preclaim<DeleteAccount>(ctx);
case ttAMENDMENT:
case ttFEE:
case ttUNL_MODIFY:
return invoke_preclaim<Change>(ctx);
default:
assert(false);
@@ -227,6 +229,7 @@ invoke_calculateBaseFee(ReadView const& view, STTx const& tx)
return DeleteAccount::calculateBaseFee(view, tx);
case ttAMENDMENT:
case ttFEE:
case ttUNL_MODIFY:
return Change::calculateBaseFee(view, tx);
default:
assert(false);
@@ -294,6 +297,7 @@ invoke_calculateConsequences(STTx const& tx)
return invoke_calculateConsequences<DeleteAccount>(tx);
case ttAMENDMENT:
case ttFEE:
case ttUNL_MODIFY:
[[fallthrough]];
default:
assert(false);
@@ -390,7 +394,8 @@ invoke_apply(ApplyContext& ctx)
return p();
}
case ttAMENDMENT:
case ttFEE: {
case ttFEE:
case ttUNL_MODIFY: {
Change p(ctx);
return p();
}