add getalltxs, dup checks

Start of double spend detection for mempool and reorgs
This commit is contained in:
Tadge Dryja
2016-02-05 01:59:40 -08:00
parent 25d90f5345
commit 63b5926e01
3 changed files with 77 additions and 1 deletions

View File

@@ -144,11 +144,29 @@ func Shellparse(cmdslice []string) error {
}
return nil
}
if cmd == "txs" {
err = Txs(args)
if err != nil {
fmt.Printf("txs error: %s\n", err)
}
return nil
}
fmt.Printf("Command not recognized. type help for command list.\n")
return nil
}
func Txs(args []string) error {
alltx, err := SCon.TS.GetAllTxs()
if err != nil {
return err
}
for i, tx := range alltx {
fmt.Printf("tx %d %s\n", i, uspv.TxToString(tx))
}
return nil
}
// Bal prints out your score.
func Bal(args []string) error {
if SCon.TS == nil {