MCPcopy Create free account
hub / github.com/DEROFDN/Engram / setRingSize

Function setRingSize

functions.go:1364–1380  ·  view source on GitHub ↗

Set the ring size for transactions

(wallet *walletapi.Wallet_Disk, s int)

Source from the content-addressed store, hash-verified

1362
1363// Set the ring size for transactions
1364func setRingSize(wallet *walletapi.Wallet_Disk, s int) bool {
1365 if wallet == nil {
1366 logger.Errorf("[Engram] No wallet found.\n")
1367 return false
1368 }
1369
1370 // Minimum ring size is 2, only accept powers of 2.
1371 if s < 2 {
1372 wallet.SetRingSize(2)
1373 logger.Printf("[Engram] Set minimum ring size: 2\n")
1374 } else {
1375 wallet.SetRingSize(s)
1376 logger.Printf("[Engram] Set default ring size: %d\n", s)
1377 }
1378
1379 return true
1380}
1381
1382// Check if a username exists, return the registered address if so
1383func checkUsername(s string, h int64) (address string, err error) {

Callers 1

loginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected