MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / createTestBalance

Function createTestBalance

transaction_benchmark_test.go:60–75  ·  view source on GitHub ↗

createTestBalance creates a test balance with the given ID and amount

(id string, balance int64)

Source from the content-addressed store, hash-verified

58
59// createTestBalance creates a test balance with the given ID and amount
60func createTestBalance(id string, balance int64) *model.Balance {
61 return &model.Balance{
62 BalanceID: id,
63 Balance: big.NewInt(balance),
64 CreditBalance: big.NewInt(balance),
65 DebitBalance: big.NewInt(0),
66 InflightBalance: big.NewInt(0),
67 InflightCreditBalance: big.NewInt(0),
68 InflightDebitBalance: big.NewInt(0),
69 Currency: "USD",
70 CurrencyMultiplier: 1,
71 LedgerID: "ledger-001",
72 CreatedAt: time.Now(),
73 Version: 1,
74 }
75}
76
77// createTestTransaction creates a test transaction
78func createTestTransaction(source, destination, reference string, amount float64) *model.Transaction {

Calls

no outgoing calls

Tested by

no test coverage detected