mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-18 13:16:25 +00:00
wip test
This commit is contained in:
@@ -32,9 +32,16 @@ type StateMachine struct {
|
||||
markets map[string]*Market // i.e. ATOM/USDC
|
||||
}
|
||||
|
||||
func New() *StateMachine {
|
||||
StateMachine := StateMachine {}
|
||||
return &StateMachine{}
|
||||
func New(db dbm.DB) *StateMachine {
|
||||
// execute a database call that fetches the data for accounts
|
||||
StateMachine := StateMachine {
|
||||
accounts: map[uint64]*Account{},
|
||||
pairs: map[string]struct{},
|
||||
commodities: map[string]struct{},
|
||||
publicKeys: map[string]struct{},
|
||||
markets: map[string]*Market{},
|
||||
}
|
||||
return &StateMachine
|
||||
}
|
||||
|
||||
func (sm *StateMachine) Info(req types.RequestInfo) types.ResponseInfo {
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
StateMachine := New()
|
||||
|
||||
|
||||
// initialise market
|
||||
market := orderbook.NewMarket(testPair)
|
||||
// create transaction
|
||||
@@ -18,3 +20,18 @@ func TestNew(t *testing.T) {
|
||||
// test to see if the tradeset is valid
|
||||
// require.EqualValues(t, )
|
||||
}
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
var b map[string]string
|
||||
var a StateMachine
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
type B struct {
|
||||
Field string
|
||||
anotherField []int
|
||||
anotherField2 [10]int
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package orderbook
|
||||
|
||||
|
||||
type AccountStore struct {
|
||||
db dbm.DB
|
||||
}
|
||||
|
||||
|
||||
// iterate over the account database
|
||||
// Add to the account database
|
||||
// find an account
|
||||
|
||||
Reference in New Issue
Block a user