ledger: remove minor alloc for difficulty
@@ -45,9 +45,10 @@ func NewLedger(kv store.KV, genesisPath string) *Ledger {
WithBeta(sys.SnowballBeta),
processors: make(map[byte]TransactionProcessor),
- difficulty: *atomic.NewUint64(sys.MinimumDifficulty),
}
+ ledger.difficulty.Store(sys.MinimumDifficulty)
+
genesis, err := performInception(ledger.accounts, genesisPath)
if err != nil {
log.Fatal().Err(err).Msgf("Failed to perform inception with genesis data from %q.", genesisPath)
