Apply renames to docs
This commit is contained in:
parent
9238ee9572
commit
e0c8417297
16
README.md
16
README.md
|
@ -37,9 +37,9 @@ Install the silk executables:
|
||||||
$ cargo install silk
|
$ cargo install silk
|
||||||
```
|
```
|
||||||
|
|
||||||
The testnode server is initialized with a transaction log from stdin and
|
The testnode server is initialized with a ledger from stdin and
|
||||||
generates new log entries on stdout. To create the input log, we'll need
|
generates new ledger entries on stdout. To create the input ledger, we'll need
|
||||||
to create *the mint* and use it to generate a *genesis log*. It's done in
|
to create *the mint* and use it to generate a *genesis ledger*. It's done in
|
||||||
two steps because the mint.json file contains a private key that will be
|
two steps because the mint.json file contains a private key that will be
|
||||||
used later in this demo.
|
used later in this demo.
|
||||||
|
|
||||||
|
@ -55,23 +55,23 @@ Now you can start the server:
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, in a separate shell, let's execute some transactions. Note we pass in
|
Then, in a separate shell, let's execute some transactions. Note we pass in
|
||||||
the JSON configuration file here, not the genesis log.
|
the JSON configuration file here, not the genesis ledger.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cat mint.json | silk-client-demo
|
$ cat mint.json | silk-client-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
Now kill the server with Ctrl-C, and take a look at the transaction log. You should
|
Now kill the server with Ctrl-C, and take a look at the ledger. You should
|
||||||
see something similar to:
|
see something similar to:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{"num_hashes":27,"id":[0, "..."],"event":"Tick"}
|
{"num_hashes":27,"id":[0, "..."],"event":"Tick"}
|
||||||
{"num_hashes":3,"id":[67, "..."],"event":{"Transaction":{"asset":42}}}
|
{"num_hashes":3,"id":[67, "..."],"event":{"Transaction":{"tokens":42}}}
|
||||||
{"num_hashes":27,"id":[0, "..."],"event":"Tick"}
|
{"num_hashes":27,"id":[0, "..."],"event":"Tick"}
|
||||||
```
|
```
|
||||||
|
|
||||||
Now restart the server from where we left off. Pass it both the genesis log, and
|
Now restart the server from where we left off. Pass it both the genesis ledger, and
|
||||||
the transaction log.
|
the transaction ledger.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cat genesis.log transactions0.log | silk-testnode > transactions1.log
|
$ cat genesis.log transactions0.log | silk-testnode > transactions1.log
|
||||||
|
|
|
@ -19,9 +19,9 @@ use std::sync::mpsc::SendError;
|
||||||
|
|
||||||
fn create_ledger(hist: &Historian<Hash>) -> Result<(), SendError<Event<Hash>>> {
|
fn create_ledger(hist: &Historian<Hash>) -> Result<(), SendError<Event<Hash>>> {
|
||||||
sleep(Duration::from_millis(15));
|
sleep(Duration::from_millis(15));
|
||||||
let asset = Hash::default();
|
let tokens = 42;
|
||||||
let keypair = generate_keypair();
|
let keypair = generate_keypair();
|
||||||
let event0 = Event::new_claim(get_pubkey(&keypair), asset, sign_claim_data(&asset, &keypair));
|
let event0 = Event::new_claim(get_pubkey(&keypair), tokens, sign_claim_data(&tokens, &keypair));
|
||||||
hist.sender.send(event0)?;
|
hist.sender.send(event0)?;
|
||||||
sleep(Duration::from_millis(10));
|
sleep(Duration::from_millis(10));
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -46,7 +46,7 @@ Running the program should produce a ledger similar to:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
Entry { num_hashes: 0, id: [0, ...], event: Tick }
|
Entry { num_hashes: 0, id: [0, ...], event: Tick }
|
||||||
Entry { num_hashes: 3, id: [67, ...], event: Transaction { asset: [37, ...] } }
|
Entry { num_hashes: 3, id: [67, ...], event: Transaction { tokens: 42 } }
|
||||||
Entry { num_hashes: 3, id: [123, ...], event: Tick }
|
Entry { num_hashes: 3, id: [123, ...], event: Tick }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue