Extend statedb and use prefixes, add debugapi

In statedb:
- Store all values using prefixes for keys to allow iteration
- Add methods MTGetRoot, GetAccounts

Implement debugapi, an http server with debugging endpoints:
- debugAPI.GET("sdb/batchnum", a.handleCurrentBatch)
- debugAPI.GET("sdb/mtroot", a.handleMTRoot)
- debugAPI.GET("sdb/accounts", a.handleAccounts)
- debugAPI.GET("sdb/accounts/:Idx", a.handleAccount)
This commit is contained in:
Eduard S
2020-10-19 13:53:39 +02:00
parent c67b1df8cd
commit 6afbda5302
8 changed files with 344 additions and 32 deletions

View File

@@ -14,7 +14,7 @@ import (
var (
// keyidx is used as key in the db to store the current Idx
keyidx = []byte("idx")
keyidx = []byte("k:idx")
)
func (s *StateDB) resetZKInputs() {