Compare commits

..

11 Commits

Author SHA1 Message Date
a430857309 Merge branch 'master' into fix-repeated-nodes 2024-09-25 01:41:43 +02:00
alfred-mk
2643c0c9ff only have a -d for the engineDebug 2024-09-24 16:11:22 +03:00
alfred-mk
b8852e1ab3 add engineDebug and stateDebug flags 2024-09-24 14:10:10 +03:00
e9fdd1ddbe Merge pull request 'Threaded gdbm' (#76) from lash/thread-gdbm into master
Reviewed-on: urdt/ussd#76
2024-09-23 21:25:37 +02:00
alfred-mk
8a03b05c90 reset the positon of LOAD function 2024-09-23 21:20:57 +03:00
alfred-mk
5a38b40eaf Merge branch 'lash/thread-gdbm' into fix-repeated-nodes 2024-09-23 20:55:56 +03:00
alfred-mk
909d1f3409 change position of LOAD function 2024-09-23 14:16:01 +03:00
alfred-mk
66cf90f044 LOAD and RELOAD get_amount 2024-09-23 14:13:26 +03:00
alfred-mk
74d5da3987 Merge branch 'lash/thread-gdbm' into fix-repeated-nodes 2024-09-23 11:40:29 +03:00
alfred-mk
f215159725 change position of LOAD 2024-09-23 11:38:07 +03:00
alfred-mk
a6301163eb use latest commit from go-vise 0.2.0 2024-09-23 09:59:21 +03:00
9 changed files with 16 additions and 26 deletions

View File

@@ -69,13 +69,11 @@ func main() {
var resourceDir string
var size uint
var engineDebug bool
var stateDebug bool
var host string
var port uint
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir")
flag.BoolVar(&engineDebug, "engine-debug", false, "use engine debug output")
flag.BoolVar(&stateDebug, "state-debug", false, "use engine debug output")
flag.BoolVar(&engineDebug, "d", false, "use engine debug output")
flag.UintVar(&size, "s", 160, "max size of output")
flag.StringVar(&host, "h", "127.0.0.1", "http host")
flag.UintVar(&port, "p", 7123, "http port")
@@ -91,9 +89,7 @@ func main() {
OutputSize: uint32(size),
FlagCount: uint32(16),
}
if stateDebug {
cfg.StateDebug = true
}
if engineDebug {
cfg.EngineDebug = true
}

View File

@@ -41,14 +41,12 @@ func main() {
var resourceDir string
var size uint
var engineDebug bool
var stateDebug bool
var host string
var port uint
flag.StringVar(&sessionId, "session-id", "075xx2123", "session id")
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir")
flag.BoolVar(&engineDebug, "engine-debug", false, "use engine debug output")
flag.BoolVar(&stateDebug, "state-debug", false, "use engine debug output")
flag.BoolVar(&engineDebug, "d", false, "use engine debug output")
flag.UintVar(&size, "s", 160, "max size of output")
flag.StringVar(&host, "h", "127.0.0.1", "http host")
flag.UintVar(&port, "p", 7123, "http port")
@@ -64,9 +62,7 @@ func main() {
OutputSize: uint32(size),
FlagCount: uint32(16),
}
if stateDebug {
cfg.StateDebug = true
}
if engineDebug {
cfg.EngineDebug = true
}

View File

@@ -30,13 +30,11 @@ func main() {
var resourceDir string
var size uint
var engineDebug bool
var stateDebug bool
var host string
var port uint
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir")
flag.BoolVar(&engineDebug, "engine-debug", false, "use engine debug output")
flag.BoolVar(&stateDebug, "state-debug", false, "use engine debug output")
flag.BoolVar(&engineDebug, "d", false, "use engine debug output")
flag.UintVar(&size, "s", 160, "max size of output")
flag.StringVar(&host, "h", "127.0.0.1", "http host")
flag.UintVar(&port, "p", 7123, "http port")
@@ -52,9 +50,7 @@ func main() {
OutputSize: uint32(size),
FlagCount: uint32(16),
}
if stateDebug {
cfg.StateDebug = true
}
if engineDebug {
cfg.EngineDebug = true
}

View File

@@ -23,10 +23,10 @@ func main() {
var dbDir string
var size uint
var sessionId string
var debug bool
var engineDebug bool
flag.StringVar(&sessionId, "session-id", "075xx2123", "session id")
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.BoolVar(&debug, "d", false, "use engine debug output")
flag.BoolVar(&engineDebug, "d", false, "use engine debug output")
flag.UintVar(&size, "s", 160, "max size of output")
flag.Parse()
@@ -93,7 +93,7 @@ func main() {
en := lhs.GetEngine()
en = en.WithFirst(hl.Init)
if debug {
if engineDebug {
en = en.WithDebug(nil)
}

View File

@@ -9,4 +9,5 @@ CATCH invalid_amount flag_invalid_amount 1
INCMP _ 0
LOAD get_recipient 12
LOAD get_sender 64
LOAD get_amount 12
INCMP transaction_pin *

View File

@@ -1,7 +1,7 @@
LOAD reset_incorrect 6
CATCH incorrect_pin flag_incorrect_pin 1
CATCH _ flag_account_authorized 0
LOAD get_amount 10
RELOAD get_amount
MAP get_amount
RELOAD get_recipient
MAP get_recipient

View File

@@ -1,2 +1,2 @@
{{.get_recipient}} will receive {{.validate_amount}} from {{.get_sender}}
{{.get_recipient}} will receive {{.get_amount}} from {{.get_sender}}
Please enter your PIN to confirm:

View File

@@ -1,12 +1,13 @@
MAP validate_amount
RELOAD get_amount
MAP get_amount
RELOAD get_recipient
MAP get_recipient
RELOAD get_sender
MAP get_sender
MOUT back 0
MOUT quit 9
HALT
LOAD authorize_account 6
HALT
RELOAD authorize_account
CATCH incorrect_pin flag_incorrect_pin 1
INCMP _ 0

View File

@@ -1,2 +1,2 @@
{{.get_recipient}} atapokea {{.validate_amount}} kutoka kwa {{.get_sender}}
{{.get_recipient}} atapokea {{.get_amount}} kutoka kwa {{.get_sender}}
Tafadhali weka PIN yako kudhibitisha: