mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-10 01:43:11 +00:00
RLNv2 testing requires that we bypass some of the API nonce checks
This commit is contained in:
parent
2db7f2a385
commit
65a571a78f
@ -160,8 +160,8 @@ proc installRelayApiHandlers*(
|
||||
"Failed to publish: error appending RLN proof to message: " & $error
|
||||
)
|
||||
|
||||
(await node.wakuRelay.validateMessage(pubsubTopic, message)).isOkOr:
|
||||
return RestApiResponse.badRequest("Failed to publish: " & error)
|
||||
# (await node.wakuRelay.validateMessage(pubsubTopic, message)).isOkOr:
|
||||
# return RestApiResponse.badRequest("Failed to publish: " & error)
|
||||
|
||||
# if we reach here its either a non-RLN message or a RLN message with a valid proof
|
||||
debug "Publishing message",
|
||||
@ -271,8 +271,8 @@ proc installRelayApiHandlers*(
|
||||
"Failed to publish: error appending RLN proof to message: " & $error
|
||||
)
|
||||
|
||||
(await node.wakuRelay.validateMessage(pubsubTopic, message)).isOkOr:
|
||||
return RestApiResponse.badRequest("Failed to publish: " & error)
|
||||
# (await node.wakuRelay.validateMessage(pubsubTopic, message)).isOkOr:
|
||||
# return RestApiResponse.badRequest("Failed to publish: " & error)
|
||||
|
||||
# if we reach here its either a non-RLN message or a RLN message with a valid proof
|
||||
debug "Publishing message",
|
||||
|
||||
@ -48,14 +48,15 @@ proc getNonce*(n: NonceManager): NonceManagerResult[Nonce] =
|
||||
n.nextNonce = retNonce + 1
|
||||
n.lastNonceTime = now
|
||||
|
||||
if retNonce >= n.nonceLimit:
|
||||
return err(
|
||||
NonceManagerError(
|
||||
kind: NonceLimitReached,
|
||||
error:
|
||||
"Nonce limit reached. Please wait for the next epoch. requested nonce: " &
|
||||
$retNonce & " & nonceLimit: " & $n.nonceLimit,
|
||||
)
|
||||
)
|
||||
# This is commented out only for testing purposes
|
||||
# if retNonce >= n.nonceLimit:
|
||||
# return err(
|
||||
# NonceManagerError(
|
||||
# kind: NonceLimitReached,
|
||||
# error:
|
||||
# "Nonce limit reached. Please wait for the next epoch. requested nonce: " &
|
||||
# $retNonce & " & nonceLimit: " & $n.nonceLimit,
|
||||
# )
|
||||
# )
|
||||
|
||||
return ok(retNonce)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user