-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore!: update proto definitions #1196
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
31740e7
chore: add `build:esm` script so it can be called from root script
fryorcraken 5f0e8b7
chore: update filter.proto
fryorcraken f6130d6
chore: use pascal case for class name
fryorcraken d6184fb
fixup! chore: update filter.proto
fryorcraken 3e93e8f
chore: update light_push.proto
fryorcraken 18d3138
chore: use pascal case for class name
fryorcraken 5cf8ed2
chore!: update message.proto: payload and content topic are always de…
fryorcraken 967e6ff
chore!: update store.proto
fryorcraken 81d6638
chore: use pascal case for class name
fryorcraken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ import { | |
Cursor, | ||
IDecodedMessage, | ||
IDecoder, | ||
Index, | ||
IStore, | ||
ProtocolCreateOptions, | ||
} from "@waku/interfaces"; | ||
|
@@ -22,7 +21,7 @@ import { BaseProtocol } from "../base_protocol.js"; | |
import { DefaultPubSubTopic } from "../constants.js"; | ||
import { toProtoMessage } from "../to_proto_message.js"; | ||
|
||
import { HistoryRPC, PageDirection, Params } from "./history_rpc.js"; | ||
import { HistoryRpc, PageDirection, Params } from "./history_rpc.js"; | ||
|
||
import HistoryError = proto.HistoryResponse.HistoryError; | ||
|
||
|
@@ -262,7 +261,7 @@ async function* paginate<T extends IDecodedMessage>( | |
while (true) { | ||
queryOpts.cursor = currentCursor; | ||
|
||
const historyRpcQuery = HistoryRPC.createQuery(queryOpts); | ||
const historyRpcQuery = HistoryRpc.createQuery(queryOpts); | ||
|
||
log( | ||
"Querying store peer", | ||
|
@@ -294,10 +293,7 @@ async function* paginate<T extends IDecodedMessage>( | |
|
||
const response = reply.response as proto.HistoryResponse; | ||
|
||
if ( | ||
response.error && | ||
response.error !== HistoryError.ERROR_NONE_UNSPECIFIED | ||
) { | ||
if (response.error && response.error !== HistoryError.NONE) { | ||
throw "History response contains an Error: " + response.error; | ||
} | ||
|
||
|
@@ -353,7 +349,7 @@ export function isDefined<T>(msg: T | undefined): msg is T { | |
export async function createCursor( | ||
message: IDecodedMessage, | ||
pubsubTopic: string = DefaultPubSubTopic | ||
): Promise<Index> { | ||
): Promise<Cursor> { | ||
if ( | ||
!message || | ||
!message.timestamp || | ||
|
@@ -373,7 +369,7 @@ export async function createCursor( | |
digest, | ||
pubsubTopic, | ||
senderTime: messageTime, | ||
receivedTime: messageTime, | ||
receiverTime: messageTime, | ||
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. I am surprised that using the waku message timestamp here works. Cc @LNSD @danisharora099 |
||
}; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why did you change capitalisation here?
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.
Capitalization was changed on proto file to proper PascalCase, I just match it as PascalCase is what we use across the codebase.