-
Notifications
You must be signed in to change notification settings - Fork 38
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
Cosmos hardfork support #811
Conversation
1aeb752
to
163a0bc
Compare
if (this.networkInfo.chainIdUpdateUrl != null) { | ||
try { | ||
const res = await this.fetchCors(this.networkInfo.chainIdUpdateUrl) | ||
const raw = await res.json() |
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.
check !res.ok
send throw await res.text() to get better details on failure
src/cosmos/CosmosEngine.ts
Outdated
this.otherData[query]?.newestTxid !== newestTxid | ||
) { | ||
this.otherData[query] = { newestTxid } | ||
this.otherData.archivedTxLastCheckTime = lastTimestamp |
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.
Setting archivedTxLastCheckTime
inside the for loop of txQueryStrings could cause the receiver
query type to not execute since archivedTxLastCheckTime
is global to both send and receive queries
for (const clients of clientsList) { | ||
const { newestTxid, lastTimestamp } = await this.queryTransactionsInner( | ||
query, | ||
clients |
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.
Removing the starting page seems to mean you'll be querying all transactions every time and not continuing from where you left off.
src/cosmos/CosmosEngine.ts
Outdated
@@ -559,7 +557,10 @@ export class CosmosEngine extends CurrencyEngine< | |||
this.otherData[query]?.newestTxid !== newestTxid | |||
) { | |||
this.otherData[query] = { newestTxid } | |||
this.otherData.archivedTxLastCheckTime = lastTimestamp | |||
this.otherData.archivedTxLastCheckTime = Math.max( |
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.
approved with requested small change of only setting archivedTxLastCheckTime once both send and recv transactions sycned.
3e5113b
to
00761cf
Compare
This adds support for multiple archive nodes, which is necessary to support a chain over multiple hardforks.
00761cf
to
534bf2a
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
none