add shell spv testing mode

To try uspv, do ./lnd -spv
The remote node is hardcoded in shell.go.  If you aren't
running a full node on localhost, specify where to connect to.
Nearby nodes will be much faster but random testnet nodes on the
internet should also work.
This commit is contained in:
Tadge Dryja
2016-02-02 23:37:29 -08:00
parent 2f9fc87636
commit 624e776987
7 changed files with 358 additions and 20 deletions

6
lnd.go
View File

@ -21,11 +21,17 @@ var (
rpcPort = flag.Int("rpcport", 10009, "The port for the rpc server")
peerPort = flag.String("peerport", "10011", "The port to listen on for incoming p2p connections")
dataDir = flag.String("datadir", "test_wal", "The directory to store lnd's data within")
spvMode = flag.Bool("spv", false, "assert to enter spv wallet mode")
)
func main() {
flag.Parse()
if *spvMode == true {
shell()
return
}
go func() {
listenAddr := net.JoinHostPort("", "5009")
profileRedirect := http.RedirectHandler("/debug/pprof",