Skip to content

Commit

Permalink
fixing rebase compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer committed Aug 19, 2024
1 parent ecc5be6 commit b9a3b5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/wakunode2/test_validators.nim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ suite "WakuNode2 - Validators":
)

# Protected shard and key to sign
let spamProtectedShard = NsPubsubTopic(clusterId: 0, shardId: 7)
let spamProtectedShard = RelayShard(clusterId: 0, shardId: 7)
let secretKey = SkSecretKey
.fromHex("5526a8990317c9b7b58d07843d270f9cd1d9aaee129294c1c478abf7261dd9e6")
.expect("valid key")
Expand Down Expand Up @@ -117,7 +117,7 @@ suite "WakuNode2 - Validators":
)

# Protected shard and key to sign
let spamProtectedShard = NsPubsubTopic(clusterId: 0, shardId: 7)
let spamProtectedShard = RelayShard(clusterId: 0, shardId: 7)
let secretKey = SkSecretKey
.fromHex("5526a8990317c9b7b58d07843d270f9cd1d9aaee129294c1c478abf7261dd9e6")
.expect("valid key")
Expand Down Expand Up @@ -267,7 +267,7 @@ suite "WakuNode2 - Validators":
)

# Protected shard and key to sign
let spamProtectedShard = NsPubsubTopic(clusterId: 0, shardId: 7)
let spamProtectedShard = RelayShard(clusterId: 0, shardId: 7)
let secretKey = SkSecretKey
.fromHex("5526a8990317c9b7b58d07843d270f9cd1d9aaee129294c1c478abf7261dd9e6")
.expect("valid key")
Expand Down
2 changes: 1 addition & 1 deletion waku/factory/external_config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ proc parseCmdArg*(T: type ProtectedShard, p: string): T =
return ProtectedShard(shard: uint16.parseCmdArg(elements[0]), key: publicKey.get())

# TO DO: Remove when removing protected-topic configuration
let shard = NsPubsubTopic.parse(elements[0]).valueOr:
let shard = RelayShard.parse(elements[0]).valueOr:
raise newException(
ValueError,
"Invalid pubsub topic. Pubsub topics must be in the format /waku/2/rs/<cluster-id>/<shard-id>",
Expand Down
2 changes: 1 addition & 1 deletion waku/factory/validator_signed.nim
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ proc addSignedShardsValidator*(

for protectedShard in protectedShards:
let topicString =
$NsPubsubTopic(clusterId: clusterId, shardId: uint16(protectedShard.shard))
$RelayShard(clusterId: clusterId, shardId: uint16(protectedShard.shard))
if (topicString == topic):
if msg.timestamp != 0:
if msg.withinTimeWindow():
Expand Down

0 comments on commit b9a3b5e

Please sign in to comment.