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

Function bigIntMapsEqual

model/transaction_test.go:35–45  ·  view source on GitHub ↗

Helper function for big.Int map comparisons

(got, want map[string]*big.Int)

Source from the content-addressed store, hash-verified

33
34// Helper function for big.Int map comparisons
35func bigIntMapsEqual(got, want map[string]*big.Int) bool {
36 if len(got) != len(want) {
37 return false
38 }
39 for k, v := range want {
40 if gotVal, ok := got[k]; !ok || gotVal.Cmp(v) != 0 {
41 return false
42 }
43 }
44 return true
45}
46
47// Helper to convert float64 to *big.Int with precision applied
48func floatToBigInt(value float64, precision int64) *big.Int {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected