Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Refactoring for rollback #97

Merged
merged 10 commits into from
Apr 2, 2018
6 changes: 3 additions & 3 deletions doc/historian.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with by verifying each entry's hash can be generated from the hash in the previo
extern crate solana;

use solana::historian::Historian;
use solana::ledger::{verify_slice, Entry, Hash};
use solana::ledger::{Block, Entry, Hash};
use solana::event::{generate_keypair, get_pubkey, sign_claim_data, Event};
use std::thread::sleep;
use std::time::Duration;
Expand All @@ -38,7 +38,7 @@ fn main() {
}
// Proof-of-History: Verify the historian learned about the events
// in the same order they appear in the vector.
assert!(verify_slice(&entries, &seed));
assert!(entries[..].verify(&seed));
}
```

Expand All @@ -56,7 +56,7 @@ Proof-of-History
Take note of the last line:

```rust
assert!(verify_slice(&entries, &seed));
assert!(entries[..].verify(&seed));
```

[It's a proof!](https://en.wikipedia.org/wiki/Curry–Howard_correspondence) For each entry returned by the
Expand Down
2 changes: 1 addition & 1 deletion doc/historian.msc
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ msc {
recorder=>historian [ label = "e2 = Entry{id: h6, n: 3, event: Tick}" ] ;
client=>historian [ label = "collect()" ] ;
historian=>client [ label = "entries = [e0, e1, e2]" ] ;
client=>client [ label = "verify_slice(entries, h0)" ] ;
client=>client [ label = "entries.verify(h0)" ] ;
}
Loading