-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: drand quicknet: allow scheduling drand quicknet upgrade before nv22 on 2k devnet #11632
Changes from 2 commits
d56cf4c
2e19791
f6a7ae3
7edbed1
bc55eb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,8 @@ var log = logging.Logger("drand") | |
// | ||
// The root trust for the Drand chain is configured from build.DrandChain. | ||
type DrandBeacon struct { | ||
client dclient.Client | ||
network dtypes.DrandEnum | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we instead make this a simple boolean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
client dclient.Client | ||
|
||
pubkey kyber.Point | ||
|
||
|
@@ -52,6 +53,10 @@ type DrandBeacon struct { | |
localCache *lru.Cache[uint64, *types.BeaconEntry] | ||
} | ||
|
||
func (db *DrandBeacon) IsChained() bool { | ||
return db.network != build.DrandQuicknet | ||
} | ||
|
||
// DrandHTTPClient interface overrides the user agent used by drand | ||
type DrandHTTPClient interface { | ||
SetUserAgent(string) | ||
|
@@ -117,6 +122,7 @@ func NewDrandBeacon(genesisTs, interval uint64, ps *pubsub.PubSub, config dtypes | |
} | ||
|
||
db := &DrandBeacon{ | ||
network: config.Network, | ||
client: client, | ||
localCache: lc, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify this to:
Then we can also drop line 140 (and just use currBeacon everywhere).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed