Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Conversation

@patrick-ogrady
Copy link
Contributor

No description provided.


func (l *LifelineTx) Execute(g *Genesis, db database.Database, blockTime uint64, _ ids.ID) error {
return addLife(g, db, l.Prefix, g.LifelineUnitReward*l.Units)
func (l *LifelineTx) Execute(t *TransactionContext) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+100, now much nicer to package them in a single TransactionContext


package chain

import "github.com/ava-labs/avalanchego/utils/crypto"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

}
}

// compute new min difficulty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix this comment? and can we also document how we decide the pricing

pDiff = g.MinDifficulty
// Sort useful costs/prices
sort.Slice(ctx.Prices, func(i, j int) bool { return ctx.Prices[i] < ctx.Prices[j] })
pPrice := ctx.Prices[(len(ctx.Prices)-1)*feePercentile/100]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to ask about feePercentile in previous PR. How did we come up with the number 60?

@patrick-ogrady patrick-ogrady changed the title Remove pow Remove POW [Part 1] Jan 14, 2022
@patrick-ogrady patrick-ogrady merged commit 0c2acd2 into master Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants