Implement new amendment majority semantics :

This implements the tracking of when an amendment achieved a majority
in the ledger, ensuring that there's always network-wide agreement
on which amendments have achieved a majority and how long they've
held it.

* New fields
* Change transactor changes
* AmendmentTable API and implementation changes
* Update amendment enabled status on validated ledgers
* Reinstate support for ledger sequence in fee transactions
This commit is contained in:
JoelKatz
2015-01-30 12:57:57 -08:00
committed by Vinnie Falco
parent 3078c6da12
commit efc2159441
18 changed files with 814 additions and 412 deletions

View File

@@ -102,6 +102,7 @@ public:
void
doVoting (Ledger::ref lastClosedLedger,
ValidationSet const& parentValidations,
std::shared_ptr<SHAMap> const& initialPosition) override;
};
@@ -145,6 +146,7 @@ FeeVoteImpl::doValidation (Ledger::ref lastClosedLedger,
void
FeeVoteImpl::doVoting (Ledger::ref lastClosedLedger,
ValidationSet const& set,
std::shared_ptr<SHAMap> const& initialPosition)
{
// LCL must be flag ledger
@@ -159,10 +161,6 @@ FeeVoteImpl::doVoting (Ledger::ref lastClosedLedger,
detail::VotableInteger<std::uint32_t> incReserveVote (
lastClosedLedger->getReserveInc (), target_.owner_reserve);
// get validations for ledger before flag
ValidationSet const set =
getApp().getValidations ().getValidations (
lastClosedLedger->getParentHash ());
for (auto const& e : set)
{
STValidation const& val = *e.second;