diff options
author | obscuren <geffobscura@gmail.com> | 2014-01-27 22:34:10 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-01-27 22:34:10 +0800 |
commit | 8b9dcdcdf04eb13e39101532a90b4a552754cb7f (patch) | |
tree | ed05864e407f52e40a3cc1ae607d42402abe43d8 /dev_console.go | |
parent | c6062a0f73c01bd069394d81a506c64a4272b124 (diff) | |
download | go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.tar go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.tar.gz go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.tar.bz2 go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.tar.lz go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.tar.xz go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.tar.zst go-tangerine-8b9dcdcdf04eb13e39101532a90b4a552754cb7f.zip |
Debugging handles
Diffstat (limited to 'dev_console.go')
-rw-r--r-- | dev_console.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dev_console.go b/dev_console.go index 6beafc447..3395124dc 100644 --- a/dev_console.go +++ b/dev_console.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/ethchain-go" "github.com/ethereum/ethdb-go" "github.com/ethereum/ethutil-go" - _ "github.com/ethereum/ethwire-go" + "github.com/ethereum/ethwire-go" _ "math/big" "os" "strings" @@ -60,6 +60,12 @@ func (i *Console) ValidateInput(action string, argumentLength int) error { case action == "contract" && argumentLength != 1: err = true expArgCount = 1 + case action == "say" && argumentLength != 1: + err = true + expArgCount = 1 + case action == "addp" && argumentLength != 1: + err = true + expArgCount = 1 } if err { @@ -129,6 +135,10 @@ func (i *Console) ParseInput(input string) bool { } else { fmt.Println("getaddr: address unknown") } + case "say": + i.ethereum.Broadcast(ethwire.MsgTalkTy, tokens[1]) + case "addp": + i.ethereum.ConnectToPeer(tokens[1]) case "encode": fmt.Printf("%q\n", ethutil.Encode(tokens[1])) /* |