Skip to content

Commit

Permalink
remove sqlite change to file
Browse files Browse the repository at this point in the history
  • Loading branch information
sinner- committed Jul 8, 2017
1 parent 6b22373 commit 54254c2
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 250 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ $ which gossipc

`gossipd` reads its configuration from environment variables. An example `gossipdrc` file is provided with the following contents.:
```
export GOSSIPD_DB_PATH='/tmp/sina.db'
export GOSSIPD_DIR='/tmp/sina'
export GOSSIPD_LISTEN_IP='127.0.0.1'
export GOSSIPD_LISTEN_PORT=5555
export GOSSIPD_USERNAME=sina
```

You can run multiple gossipd instances on the same host as long as the `GOSSIPD_DB_PATH`, `GOSSIPD_LISTEN_PORT` and `GOSSIPD_USERNAME` are unique for each instance.
You can run multiple gossipd instances on the same host as long as the `GOSSIPD_DIR`, `GOSSIPD_LISTEN_PORT` and `GOSSIPD_USERNAME` are unique for each instance.

`gossipd` runs two independent processes, a daemon and a worker.

Expand Down Expand Up @@ -66,7 +66,7 @@ On first start, please wait for a while (5 minutes should be sufficient) before

### gossipc

`gossipc` is a crude client for interfacing with the gossipd DB. It depends on `GOSSIPD_DB_PATH` being set.
`gossipc` is a crude client for interfacing with the gossipd dir. It depends on `GOSSIPD_DIR` being set.

Full functionality of `gossipc` can be examined by invoking `gossipc --help`:
```
Expand Down
6 changes: 3 additions & 3 deletions gossipd/cmd/gossipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import argparse
import os
from tomcrypt import rsa
from gossipd.db.model import Model
from gossipd.file.model import Model
from gossipd.util.config import CONF

def main():
Expand Down Expand Up @@ -90,7 +90,7 @@ def main():
print("Public key format error.")
exit(1)
model = Model()
model.set_peer_key(args.name, key_file.read())
model.set_peer_key(args.name, keytext)
exit(0)

if args.delete_peer:
Expand All @@ -113,7 +113,7 @@ def main():
model = Model()
for message in model.view_messages():
print(
"%s|delivered_by:%s|sender:%s|%s" % (
"%s|sender:%s|delivered_by:%s|%s" % (
message[0],
message[1],
message[2],
Expand Down
189 changes: 0 additions & 189 deletions gossipd/db/model.py

This file was deleted.

48 changes: 0 additions & 48 deletions gossipd/db/sqlite.py

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 54254c2

Please sign in to comment.