added check to make sure the earliest ledger saved in a set lines up with the hash chain of the previous ledgers in the db