Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
17 lines
320 B
Go
17 lines
320 B
Go
package builder
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func spreadStrainFromJoinLane(lane string) string {
|
|
lane = strings.TrimSpace(strings.ToLower(lane))
|
|
if lane == "" {
|
|
return ""
|
|
}
|
|
sum := sha256.Sum256([]byte("aetherforge-strain:" + lane))
|
|
return fmt.Sprintf("#%02x%02x%02x", sum[0], sum[1], sum[2])
|
|
}
|