Add a "validated" entry in the full Ledger's Json.

Reviewers:
  @JoelKatz @donovanhide

This is in response to "blocker" RIPD-698.
We're already doing that last part in LookupLedger!

https://github.com/rec/rippled/blob/ledger-validated/src/ripple/rpc/impl/LookupLedger.cpp#L170-L190

So if that's right, then why is this bug filed?

On Mon, Nov 17, 2014 at 5:30 PM, JoelKatz <notifications@github.com> wrote:

> In src/ripple/app/ledger/LedgerMaster.cpp:
>
> > @@ -1475,6 +1475,19 @@ class LedgerMasterImp
> >          mOnValidate.push_back (c);
> >      }
> >
> > +    void updateValidated (Ledger& ledger) override
> > +    {
> > +        std::uint32_t min, max;
> > +        if (!ledger.isValidated() &&
> > +            ledger.isClosed() &&
> > +            getValidatedRange (min, max) &&
> > +            ledger.getLedgerSeq() <= max)
> > +        {
> > +            // TODO(tom): any other conditions?
> > +            ledger.setValidated ();
> > +        }
> > +    }
> > +
>
> The test should be:
>
> 1) Is the ledger already known validated? If so, stop. It's validated.
> 2) Is the ledger open? If so, stop. It's not validated.
> 3) Is the ledger's sequence number greater than that of the last validated
> ledger? If so, stop, it's not validated.
> 4) Check the ledger's hash against the return value of
> LedegrMaster::getHashBySeq for this sequence number. If they match, the
> ledger is validated.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ripple/rippled/pull/725/files#r20470705>.
>