aboutsummaryrefslogtreecommitdiffstats
path: root/db_query_interface.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-01-09 18:57:35 +0800
committerobscuren <geffobscura@gmail.com>2014-01-09 18:57:35 +0800
commitd2b3071b4d820b9530b3de891078970ea036767c (patch)
tree31067ae6de066106fd54c8367301e1ae1ff1985b /db_query_interface.go
parent92b6667bd1cf7aad4a00331d761d8a92b03a7cae (diff)
downloadgo-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.tar
go-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.tar.gz
go-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.tar.bz2
go-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.tar.lz
go-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.tar.xz
go-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.tar.zst
go-tangerine-d2b3071b4d820b9530b3de891078970ea036767c.zip
db console is now a general console.
Diffstat (limited to 'db_query_interface.go')
-rw-r--r--db_query_interface.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/db_query_interface.go b/db_query_interface.go
index 007f4bf28..ec1d7feb5 100644
--- a/db_query_interface.go
+++ b/db_query_interface.go
@@ -32,6 +32,9 @@ func (i *DbInterface) ValidateInput(action string, argumentLength int) error {
case action == "get" && argumentLength != 1:
err = true
expArgCount = 1
+ case action == "dag" && argumentLength != 2:
+ err = true
+ expArgCount = 2
}
if err {
@@ -74,6 +77,8 @@ func (i *DbInterface) ParseInput(input string) bool {
fmt.Println(i.trie.root)
case "print":
i.db.Print()
+ case "dag":
+ fmt.Println(DaggerVerify(Big(tokens[1]), BigPow(2, 36), Big(tokens[2])))
case "exit", "quit", "q":
return false
case "help":