mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 21:32:32 +02:00
add getalltxs, dup checks
Start of double spend detection for mempool and reorgs
This commit is contained in:
18
shell.go
18
shell.go
@@ -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 {
|
||||
|
Reference in New Issue
Block a user